diff --git a/.github/workflows/lsif-ts.yml b/.github/workflows/lsif-ts.yml index b246bc480cd..45541d40f71 100644 --- a/.github/workflows/lsif-ts.yml +++ b/.github/workflows/lsif-ts.yml @@ -24,6 +24,7 @@ jobs: - client/web - client/wildcard - client/common + - client/http-client - client/codeintellify - client/template-parser steps: diff --git a/.gitignore b/.gitignore index cdb2f871777..bae6ff0114f 100644 --- a/.gitignore +++ b/.gitignore @@ -103,7 +103,7 @@ package-lock.json .nyc_output/ coverage/ out/ -client/shared/src/graphql/schema.ts +client/shared/src/schema.ts client/web/src/schema/* puppeteer/ package-lock.json diff --git a/.vscode/settings.json b/.vscode/settings.json index e95ab0248c4..ad76948fe35 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -61,6 +61,7 @@ "./client/browser", "./client/build-config", "./client/shared", + "./client/http-client", "./client/branded", "./client/wildcard", "./client/storybook", diff --git a/client/branded/.eslintignore b/client/branded/.eslintignore index 23e8b182517..da863f83a0c 100644 --- a/client/branded/.eslintignore +++ b/client/branded/.eslintignore @@ -1,3 +1,3 @@ out/ -src/graphql/schema.ts +src/schema.ts src/graphql-operations.ts diff --git a/client/browser/src/browser-extension/scripts/backgroundPage.main.ts b/client/browser/src/browser-extension/scripts/backgroundPage.main.ts index 718719ad796..009bb79d37e 100644 --- a/client/browser/src/browser-extension/scripts/backgroundPage.main.ts +++ b/client/browser/src/browser-extension/scripts/backgroundPage.main.ts @@ -19,8 +19,8 @@ import { import addDomainPermissionToggle from 'webext-domain-permission-toggle' import { isDefined } from '@sourcegraph/common' +import { GraphQLResult, requestGraphQLCommon } from '@sourcegraph/http-client' import { createExtensionHostWorker } from '@sourcegraph/shared/src/api/extension/worker' -import { GraphQLResult, requestGraphQLCommon } from '@sourcegraph/shared/src/graphql/graphql' import { EndpointPair } from '@sourcegraph/shared/src/platform/context' import { fetchCache } from '@sourcegraph/shared/src/util/fetchCache' diff --git a/client/browser/src/browser-extension/scripts/optionsPage.main.tsx b/client/browser/src/browser-extension/scripts/optionsPage.main.tsx index 89b577961fa..159b24be771 100644 --- a/client/browser/src/browser-extension/scripts/optionsPage.main.tsx +++ b/client/browser/src/browser-extension/scripts/optionsPage.main.tsx @@ -8,8 +8,8 @@ import { catchError, map, mapTo } from 'rxjs/operators' import { Optional } from 'utility-types' import { asError } from '@sourcegraph/common' +import { GraphQLResult } from '@sourcegraph/http-client' import { AnchorLink, setLinkComponent } from '@sourcegraph/shared/src/components/Link' -import { GraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' import { isFirefox } from '@sourcegraph/shared/src/util/browserDetection' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/browser/src/browser-extension/web-extension-api/types.ts b/client/browser/src/browser-extension/web-extension-api/types.ts index cc57503e1f3..fed285cdfe1 100644 --- a/client/browser/src/browser-extension/web-extension-api/types.ts +++ b/client/browser/src/browser-extension/web-extension-api/types.ts @@ -1,4 +1,4 @@ -import { GraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' +import { GraphQLResult } from '@sourcegraph/http-client' import { fetchCache } from '@sourcegraph/shared/src/util/fetchCache' import { OptionFlagValues } from '../../shared/util/optionFlags' diff --git a/client/browser/src/shared/backend/diffs.tsx b/client/browser/src/shared/backend/diffs.tsx index 80f090ff0a2..4e702a8d219 100644 --- a/client/browser/src/shared/backend/diffs.tsx +++ b/client/browser/src/shared/backend/diffs.tsx @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { RepoNotFoundError } from '@sourcegraph/shared/src/backend/errors' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' diff --git a/client/browser/src/shared/backend/requestGraphQl.ts b/client/browser/src/shared/backend/requestGraphQl.ts index f1b473ba0fc..24dc97cc571 100644 --- a/client/browser/src/shared/backend/requestGraphQl.ts +++ b/client/browser/src/shared/backend/requestGraphQl.ts @@ -3,12 +3,7 @@ import { once } from 'lodash' import { from, Observable } from 'rxjs' import { switchMap, take } from 'rxjs/operators' -import { - GraphQLResult, - getGraphQLClient, - GraphQLClient, - requestGraphQLCommon, -} from '@sourcegraph/shared/src/graphql/graphql' +import { GraphQLResult, getGraphQLClient, GraphQLClient, requestGraphQLCommon } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' import { background } from '../../browser-extension/web-extension-api/runtime' diff --git a/client/browser/src/shared/backend/server.ts b/client/browser/src/shared/backend/server.ts index 5a433693be2..684038e8792 100644 --- a/client/browser/src/shared/backend/server.ts +++ b/client/browser/src/shared/backend/server.ts @@ -1,9 +1,9 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' export const fetchSite = (requestGraphQL: PlatformContext['requestGraphQL']): Observable => requestGraphQL({ diff --git a/client/browser/src/shared/backend/userEvents.tsx b/client/browser/src/shared/backend/userEvents.tsx index 38111b41763..e327c7de184 100644 --- a/client/browser/src/shared/backend/userEvents.tsx +++ b/client/browser/src/shared/backend/userEvents.tsx @@ -1,6 +1,6 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { UserEvent, EventSource } from '../../graphql-operations' import { isDefaultSourcegraphUrl } from '../util/context' diff --git a/client/browser/src/shared/code-hosts/bitbucket/api.ts b/client/browser/src/shared/code-hosts/bitbucket/api.ts index 9fb0365b065..bfa7a1fe1a7 100644 --- a/client/browser/src/shared/code-hosts/bitbucket/api.ts +++ b/client/browser/src/shared/code-hosts/bitbucket/api.ts @@ -4,7 +4,7 @@ import { fromFetch } from 'rxjs/fetch' import { filter, map } from 'rxjs/operators' import { isDefined } from '@sourcegraph/common' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' +import { checkOk } from '@sourcegraph/http-client' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { DiffResolvedRevisionSpec } from '../../repo' diff --git a/client/browser/src/shared/code-hosts/gitlab/api.ts b/client/browser/src/shared/code-hosts/gitlab/api.ts index 88944ba9962..0acaa22d608 100644 --- a/client/browser/src/shared/code-hosts/gitlab/api.ts +++ b/client/browser/src/shared/code-hosts/gitlab/api.ts @@ -3,7 +3,7 @@ import { Observable, zip, of } from 'rxjs' import { fromFetch } from 'rxjs/fetch' import { map, switchMap } from 'rxjs/operators' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' +import { checkOk } from '@sourcegraph/http-client' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { GitLabInfo } from './scrape' diff --git a/client/browser/src/shared/code-hosts/phabricator/backend.tsx b/client/browser/src/shared/code-hosts/phabricator/backend.tsx index 008231ff1a2..3bdb3b9147a 100644 --- a/client/browser/src/shared/code-hosts/phabricator/backend.tsx +++ b/client/browser/src/shared/code-hosts/phabricator/backend.tsx @@ -2,11 +2,10 @@ import { from, Observable, of, throwError } from 'rxjs' import { fromFetch } from 'rxjs/fetch' import { map, mapTo, switchMap, catchError } from 'rxjs/operators' +import { dataOrThrowErrors, gql, checkOk } from '@sourcegraph/http-client' import { isRepoNotFoundErrorLike } from '@sourcegraph/shared/src/backend/errors' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { RepoSpec, FileSpec, ResolvedRevisionSpec } from '@sourcegraph/shared/src/util/url' diff --git a/client/browser/src/shared/code-hosts/phabricator/fileInfo.test.ts b/client/browser/src/shared/code-hosts/phabricator/fileInfo.test.ts index bc2d659afda..e077a08791b 100644 --- a/client/browser/src/shared/code-hosts/phabricator/fileInfo.test.ts +++ b/client/browser/src/shared/code-hosts/phabricator/fileInfo.test.ts @@ -1,9 +1,9 @@ import { readFile } from 'mz/fs' import { Observable, throwError, of } from 'rxjs' -import { SuccessGraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' -import { IMutation, IQuery } from '@sourcegraph/shared/src/graphql/schema' +import { SuccessGraphQLResult } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import { IMutation, IQuery } from '@sourcegraph/shared/src/schema' import { resetAllMemoizationCaches } from '@sourcegraph/shared/src/util/memoizeObservable' import { DiffOrBlobInfo } from '../shared/codeHost' diff --git a/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.test.tsx b/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.test.tsx index 1c3a627ab94..8c005717b8f 100644 --- a/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.test.tsx +++ b/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.test.tsx @@ -2,7 +2,7 @@ import { render } from '@testing-library/react' import { noop } from 'lodash' import * as React from 'react' -import { HTTPStatusError } from '@sourcegraph/shared/src/backend/fetch' +import { HTTPStatusError } from '@sourcegraph/http-client' import { ViewOnSourcegraphButton } from './ViewOnSourcegraphButton' diff --git a/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.tsx b/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.tsx index 7e29ce30c5e..0abd7135e11 100644 --- a/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.tsx +++ b/client/browser/src/shared/code-hosts/shared/ViewOnSourcegraphButton.tsx @@ -3,7 +3,7 @@ import { snakeCase } from 'lodash' import React, { useEffect } from 'react' import { ErrorLike, isErrorLike } from '@sourcegraph/common' -import { isHTTPAuthError } from '@sourcegraph/shared/src/backend/fetch' +import { isHTTPAuthError } from '@sourcegraph/http-client' import { SourcegraphIconButton, SourcegraphIconButtonProps } from '../../components/SourcegraphIconButton' import { getPlatformName, isDefaultSourcegraphUrl } from '../../util/context' diff --git a/client/browser/src/shared/code-hosts/shared/codeHost.test.tsx b/client/browser/src/shared/code-hosts/shared/codeHost.test.tsx index f64c9d324de..498cea58455 100644 --- a/client/browser/src/shared/code-hosts/shared/codeHost.test.tsx +++ b/client/browser/src/shared/code-hosts/shared/codeHost.test.tsx @@ -13,14 +13,14 @@ import * as sourcegraph from 'sourcegraph' import { DiffPart } from '@sourcegraph/codeintellify' import { Range } from '@sourcegraph/extension-api-classes' import { TextDocumentDecoration } from '@sourcegraph/extension-api-types' +import { SuccessGraphQLResult } from '@sourcegraph/http-client' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { FlatExtensionHostAPI } from '@sourcegraph/shared/src/api/contract' import { ExtensionCodeEditor } from '@sourcegraph/shared/src/api/extension/api/codeEditor' import { NotificationType } from '@sourcegraph/shared/src/api/extension/extensionHostApi' import { integrationTestContext } from '@sourcegraph/shared/src/api/integration-test/testHelpers' import { Controller } from '@sourcegraph/shared/src/extensions/controller' -import { SuccessGraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' -import { IQuery } from '@sourcegraph/shared/src/graphql/schema' +import { IQuery } from '@sourcegraph/shared/src/schema' import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService' import { resetAllMemoizationCaches } from '@sourcegraph/shared/src/util/memoizeObservable' import { MockIntersectionObserver } from '@sourcegraph/shared/src/util/MockIntersectionObserver' diff --git a/client/browser/src/shared/code-hosts/shared/codeHost.tsx b/client/browser/src/shared/code-hosts/shared/codeHost.tsx index a4e3c01bfa9..08770820c82 100644 --- a/client/browser/src/shared/code-hosts/shared/codeHost.tsx +++ b/client/browser/src/shared/code-hosts/shared/codeHost.tsx @@ -47,13 +47,13 @@ import { } from '@sourcegraph/codeintellify' import { asError, isDefined } from '@sourcegraph/common' import { TextDocumentDecoration, WorkspaceRoot } from '@sourcegraph/extension-api-types' +import { isHTTPAuthError } from '@sourcegraph/http-client' import { ActionItemAction, urlForClientCommandOpen } from '@sourcegraph/shared/src/actions/ActionItem' import { wrapRemoteObservable } from '@sourcegraph/shared/src/api/client/api/common' import { HoverMerged } from '@sourcegraph/shared/src/api/client/types/hover' import { DecorationMapByLine } from '@sourcegraph/shared/src/api/extension/api/decorations' import { CodeEditorData, CodeEditorWithPartialModel } from '@sourcegraph/shared/src/api/viewerTypes' import { isRepoNotFoundErrorLike } from '@sourcegraph/shared/src/backend/errors' -import { isHTTPAuthError } from '@sourcegraph/shared/src/backend/fetch' import { CommandListClassProps, CommandListPopoverButtonClassProps, diff --git a/client/browser/src/shared/code-hosts/shared/testHelpers.ts b/client/browser/src/shared/code-hosts/shared/testHelpers.ts index f8352c4cd26..2e2517fd5d4 100644 --- a/client/browser/src/shared/code-hosts/shared/testHelpers.ts +++ b/client/browser/src/shared/code-hosts/shared/testHelpers.ts @@ -1,8 +1,8 @@ import { Observable, of, throwError } from 'rxjs' -import { GraphQLResult, SuccessGraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' -import { IQuery } from '@sourcegraph/shared/src/graphql/schema' +import { GraphQLResult, SuccessGraphQLResult } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import { IQuery } from '@sourcegraph/shared/src/schema' export interface GraphQLResponseMap { [requestName: string]: ( diff --git a/client/browser/src/shared/components/CodeViewToolbar.tsx b/client/browser/src/shared/components/CodeViewToolbar.tsx index 553b4f5dfef..826f2d695e8 100644 --- a/client/browser/src/shared/components/CodeViewToolbar.tsx +++ b/client/browser/src/shared/components/CodeViewToolbar.tsx @@ -3,10 +3,10 @@ import * as H from 'history' import * as React from 'react' import { ErrorLike, isErrorLike } from '@sourcegraph/common' +import { isHTTPAuthError } from '@sourcegraph/http-client' import { ActionNavItemsClassProps, ActionsNavItems } from '@sourcegraph/shared/src/actions/ActionsNavItems' import { ContributionScope } from '@sourcegraph/shared/src/api/extension/api/context/context' import { ContributableMenu } from '@sourcegraph/shared/src/api/protocol' -import { isHTTPAuthError } from '@sourcegraph/shared/src/backend/fetch' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/browser/src/shared/platform/context.ts b/client/browser/src/shared/platform/context.ts index c2f88103248..e100db7edb4 100644 --- a/client/browser/src/shared/platform/context.ts +++ b/client/browser/src/shared/platform/context.ts @@ -2,9 +2,9 @@ import { combineLatest, ReplaySubject } from 'rxjs' import { map } from 'rxjs/operators' import { asError } from '@sourcegraph/common' -import { isHTTPAuthError } from '@sourcegraph/shared/src/backend/fetch' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { isHTTPAuthError } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { mutateSettings, updateSettings } from '@sourcegraph/shared/src/settings/edit' import { EMPTY_SETTINGS_CASCADE, gqlToCascade } from '@sourcegraph/shared/src/settings/settings' import { LocalStorageSubject } from '@sourcegraph/shared/src/util/LocalStorageSubject' diff --git a/client/browser/src/shared/platform/inlineExtensionsService.ts b/client/browser/src/shared/platform/inlineExtensionsService.ts index cff8ced4f23..dcafd71fcbe 100644 --- a/client/browser/src/shared/platform/inlineExtensionsService.ts +++ b/client/browser/src/shared/platform/inlineExtensionsService.ts @@ -1,7 +1,7 @@ import { Subscribable, from } from 'rxjs' +import { checkOk } from '@sourcegraph/http-client' import { ExecutableExtension } from '@sourcegraph/shared/src/api/extension/activation' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' import { ExtensionManifest } from '@sourcegraph/shared/src/extensions/extensionManifest' import { isFirefox } from '@sourcegraph/shared/src/util/browserDetection' diff --git a/client/browser/src/shared/platform/settings.ts b/client/browser/src/shared/platform/settings.ts index fe1b090ef03..db7f4e0cbd9 100644 --- a/client/browser/src/shared/platform/settings.ts +++ b/client/browser/src/shared/platform/settings.ts @@ -4,10 +4,10 @@ import { from, fromEvent, Observable } from 'rxjs' import { distinctUntilChanged, filter, map, startWith } from 'rxjs/operators' import { isErrorLike } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { SettingsEdit } from '@sourcegraph/shared/src/api/client/services/settings' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { mergeSettings, SettingsCascade, diff --git a/client/browser/src/shared/platform/worker.ts b/client/browser/src/shared/platform/worker.ts index 4bed3bbbe31..1b744bfd616 100644 --- a/client/browser/src/shared/platform/worker.ts +++ b/client/browser/src/shared/platform/worker.ts @@ -1,4 +1,4 @@ -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' +import { checkOk } from '@sourcegraph/http-client' import { isDefaultSourcegraphUrl } from '../util/context' diff --git a/client/browser/src/shared/repo/backend.tsx b/client/browser/src/shared/repo/backend.tsx index 9371d5821b8..1661502f01d 100644 --- a/client/browser/src/shared/repo/backend.tsx +++ b/client/browser/src/shared/repo/backend.tsx @@ -2,15 +2,15 @@ import { from, Observable } from 'rxjs' import { delay, filter, map, retryWhen, switchMap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { CloneInProgressError, RepoNotFoundError, RevisionNotFoundError, isCloneInProgressErrorLike, } from '@sourcegraph/shared/src/backend/errors' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { sha256 } from '@sourcegraph/shared/src/util/hashCode' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { diff --git a/client/browser/tsconfig.json b/client/browser/tsconfig.json index 3622fc7c557..55a0fef2338 100644 --- a/client/browser/tsconfig.json +++ b/client/browser/tsconfig.json @@ -4,6 +4,7 @@ { "path": "../shared" }, { "path": "../branded" }, { "path": "../../schema" }, + { "path": "../http-client" }, { "path": "../common" }, { "path": "../codeintellify" }, ], diff --git a/client/http-client/.eslintignore b/client/http-client/.eslintignore new file mode 100644 index 00000000000..89f9ac04aac --- /dev/null +++ b/client/http-client/.eslintignore @@ -0,0 +1 @@ +out/ diff --git a/client/http-client/.eslintrc.js b/client/http-client/.eslintrc.js new file mode 100644 index 00000000000..3747f40c469 --- /dev/null +++ b/client/http-client/.eslintrc.js @@ -0,0 +1,13 @@ +// @ts-check + +const baseConfig = require('../../.eslintrc.js') + +module.exports = { + extends: '../../.eslintrc.js', + parserOptions: { + ...baseConfig.parserOptions, + project: [__dirname + '/tsconfig.json'], + }, + rules: {}, + overrides: baseConfig.overrides, +} diff --git a/client/http-client/README.md b/client/http-client/README.md new file mode 100644 index 00000000000..4f18bc26281 --- /dev/null +++ b/client/http-client/README.md @@ -0,0 +1,3 @@ +# Http Client + +Generic logic for sending and handling HTTP requests from our client applications. diff --git a/client/http-client/babel.config.js b/client/http-client/babel.config.js new file mode 100644 index 00000000000..73a95d310cd --- /dev/null +++ b/client/http-client/babel.config.js @@ -0,0 +1,5 @@ +// @ts-check + +module.exports = { + extends: '../../babel.config.js', +} diff --git a/client/http-client/jest.config.js b/client/http-client/jest.config.js new file mode 100644 index 00000000000..314dc4b7adc --- /dev/null +++ b/client/http-client/jest.config.js @@ -0,0 +1,13 @@ +// @ts-check + +const config = require('../../jest.config.base') + +const exportedConfig = { + ...config, + displayName: 'http-client', + rootDir: __dirname, + roots: [''], + verbose: true, +} + +module.exports = exportedConfig diff --git a/client/http-client/package.json b/client/http-client/package.json new file mode 100644 index 00000000000..a689ba3fbe3 --- /dev/null +++ b/client/http-client/package.json @@ -0,0 +1,13 @@ +{ + "private": true, + "name": "@sourcegraph/http-client", + "version": "0.0.1", + "description": "Sourcegraph http-client", + "main": "./src/index.ts", + "sideEffects": false, + "license": "Apache-2.0", + "scripts": { + "eslint": "eslint --cache 'src/**/*.[jt]s?(x)'", + "test": "jest" + } +} diff --git a/client/shared/src/graphql/apollo/cache.ts b/client/http-client/src/graphql/apollo/cache.ts similarity index 88% rename from client/shared/src/graphql/apollo/cache.ts rename to client/http-client/src/graphql/apollo/cache.ts index 153a04ddded..b7485ab1468 100644 --- a/client/shared/src/graphql/apollo/cache.ts +++ b/client/http-client/src/graphql/apollo/cache.ts @@ -1,7 +1,7 @@ import { InMemoryCache } from '@apollo/client' -import { TypedTypePolicies } from '../../graphql-operations' -import { IExtensionRegistry } from '../schema' +import { TypedTypePolicies } from '@sourcegraph/shared/src/graphql-operations' +import { IExtensionRegistry } from '@sourcegraph/shared/src/schema' // Defines how the Apollo cache interacts with our GraphQL schema. // See https://www.apollographql.com/docs/react/caching/cache-configuration/#typepolicy-fields diff --git a/client/shared/src/graphql/apollo/client.ts b/client/http-client/src/graphql/apollo/client.ts similarity index 100% rename from client/shared/src/graphql/apollo/client.ts rename to client/http-client/src/graphql/apollo/client.ts diff --git a/client/shared/src/graphql/apollo/fromObservableQuery.test.ts b/client/http-client/src/graphql/apollo/fromObservableQuery.test.ts similarity index 100% rename from client/shared/src/graphql/apollo/fromObservableQuery.test.ts rename to client/http-client/src/graphql/apollo/fromObservableQuery.test.ts diff --git a/client/shared/src/graphql/apollo/fromObservableQuery.ts b/client/http-client/src/graphql/apollo/fromObservableQuery.ts similarity index 100% rename from client/shared/src/graphql/apollo/fromObservableQuery.ts rename to client/http-client/src/graphql/apollo/fromObservableQuery.ts diff --git a/client/shared/src/graphql/apollo/hooks.ts b/client/http-client/src/graphql/apollo/hooks.ts similarity index 100% rename from client/shared/src/graphql/apollo/hooks.ts rename to client/http-client/src/graphql/apollo/hooks.ts diff --git a/client/shared/src/graphql/apollo/index.ts b/client/http-client/src/graphql/apollo/index.ts similarity index 59% rename from client/shared/src/graphql/apollo/index.ts rename to client/http-client/src/graphql/apollo/index.ts index 277bc153f13..f3b9e09d57d 100644 --- a/client/shared/src/graphql/apollo/index.ts +++ b/client/http-client/src/graphql/apollo/index.ts @@ -1,3 +1,5 @@ export * from './fromObservableQuery' export * from './client' export * from './hooks' +export * from './persistenceMapper' +export * from './cache' diff --git a/client/shared/src/graphql/apollo/persistenceMapper.test.ts b/client/http-client/src/graphql/apollo/persistenceMapper.test.ts similarity index 100% rename from client/shared/src/graphql/apollo/persistenceMapper.test.ts rename to client/http-client/src/graphql/apollo/persistenceMapper.test.ts diff --git a/client/shared/src/graphql/apollo/persistenceMapper.ts b/client/http-client/src/graphql/apollo/persistenceMapper.ts similarity index 97% rename from client/shared/src/graphql/apollo/persistenceMapper.ts rename to client/http-client/src/graphql/apollo/persistenceMapper.ts index dbc3486fb2b..206e4443ab1 100644 --- a/client/shared/src/graphql/apollo/persistenceMapper.ts +++ b/client/http-client/src/graphql/apollo/persistenceMapper.ts @@ -1,4 +1,4 @@ -import { IQuery } from '../schema' +import { IQuery } from '@sourcegraph/shared/src/schema' /** * Hardcoded names of the queries which will be persisted to the local storage. diff --git a/client/shared/src/graphql/constants.ts b/client/http-client/src/graphql/constants.ts similarity index 100% rename from client/shared/src/graphql/constants.ts rename to client/http-client/src/graphql/constants.ts diff --git a/client/shared/src/graphql/graphql.test.ts b/client/http-client/src/graphql/graphql.test.ts similarity index 100% rename from client/shared/src/graphql/graphql.test.ts rename to client/http-client/src/graphql/graphql.test.ts diff --git a/client/shared/src/graphql/graphql.ts b/client/http-client/src/graphql/graphql.ts similarity index 98% rename from client/shared/src/graphql/graphql.ts rename to client/http-client/src/graphql/graphql.ts index cf879299036..72824f65a88 100644 --- a/client/shared/src/graphql/graphql.ts +++ b/client/http-client/src/graphql/graphql.ts @@ -6,7 +6,7 @@ import { Omit } from 'utility-types' import { createAggregateError } from '@sourcegraph/common' -import { checkOk } from '../backend/fetch' +import { checkOk } from '../http-status-error' import { GRAPHQL_URI } from './constants' diff --git a/client/shared/src/graphql/links/concurrent-requests-link.ts b/client/http-client/src/graphql/links/concurrent-requests-link.ts similarity index 100% rename from client/shared/src/graphql/links/concurrent-requests-link.ts rename to client/http-client/src/graphql/links/concurrent-requests-link.ts diff --git a/client/http-client/src/graphql/links/index.ts b/client/http-client/src/graphql/links/index.ts new file mode 100644 index 00000000000..835b9c2ba47 --- /dev/null +++ b/client/http-client/src/graphql/links/index.ts @@ -0,0 +1 @@ +export * from './concurrent-requests-link' diff --git a/client/shared/src/graphql/types.ts b/client/http-client/src/graphql/types.ts similarity index 100% rename from client/shared/src/graphql/types.ts rename to client/http-client/src/graphql/types.ts diff --git a/client/shared/src/backend/fetch.ts b/client/http-client/src/http-status-error.ts similarity index 100% rename from client/shared/src/backend/fetch.ts rename to client/http-client/src/http-status-error.ts diff --git a/client/http-client/src/index.ts b/client/http-client/src/index.ts new file mode 100644 index 00000000000..3b97e9bf820 --- /dev/null +++ b/client/http-client/src/index.ts @@ -0,0 +1,5 @@ +export * from './graphql/types' +export * from './graphql/graphql' +export * from './graphql/constants' +export * from './graphql/links/concurrent-requests-link' +export * from './http-status-error' diff --git a/client/http-client/tsconfig.json b/client/http-client/tsconfig.json new file mode 100644 index 00000000000..3ff61526e3f --- /dev/null +++ b/client/http-client/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "sourceRoot": "src", + "rootDir": ".", + "outDir": "./out", + "baseUrl": "./src", + }, + "include": ["./src/**/*", "./*.ts"], + "references": [{ "path": "../common" }], +} diff --git a/client/shared/.eslintignore b/client/shared/.eslintignore index 23e8b182517..da863f83a0c 100644 --- a/client/shared/.eslintignore +++ b/client/shared/.eslintignore @@ -1,3 +1,3 @@ out/ -src/graphql/schema.ts +src/schema.ts src/graphql-operations.ts diff --git a/client/shared/dev/generateGraphQlOperations.js b/client/shared/dev/generateGraphQlOperations.js index f03f1effa6c..173f1cb33ff 100644 --- a/client/shared/dev/generateGraphQlOperations.js +++ b/client/shared/dev/generateGraphQlOperations.js @@ -14,7 +14,7 @@ const SCHEMA_PATH = path.join(ROOT_FOLDER, './cmd/frontend/graphqlbackend/*.grap const SHARED_DOCUMENTS_GLOB = [ `${SHARED_FOLDER}/src/**/*.{ts,tsx}`, `!${SHARED_FOLDER}/src/testing/**/*.*`, - `!${SHARED_FOLDER}/src/graphql/schema.ts`, + `!${SHARED_FOLDER}/src/schema.ts`, ] const WEB_DOCUMENTS_GLOB = [ diff --git a/client/shared/gulpfile.js b/client/shared/gulpfile.js index fd512f0d1d7..a7398a0e77d 100644 --- a/client/shared/gulpfile.js +++ b/client/shared/gulpfile.js @@ -62,7 +62,7 @@ async function graphQlSchema() { postProcessor: code => format(code, { ...formatOptions, parser: 'typescript' }), } ) - await writeFile(__dirname + '/src/graphql/schema.ts', typings) + await writeFile(__dirname + '/src/schema.ts', typings) } /** diff --git a/client/shared/src/api/client/enabledExtensions.ts b/client/shared/src/api/client/enabledExtensions.ts index 4bae9e9fc52..03e0d25e7c0 100644 --- a/client/shared/src/api/client/enabledExtensions.ts +++ b/client/shared/src/api/client/enabledExtensions.ts @@ -4,8 +4,8 @@ import { fromFetch } from 'rxjs/fetch' import { catchError, distinctUntilChanged, map, publishReplay, refCount, shareReplay, switchMap } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' +import { checkOk } from '@sourcegraph/http-client' -import { checkOk } from '../../backend/fetch' import { ConfiguredExtension, ConfiguredExtensionManifestDefaultFields, diff --git a/client/shared/src/api/client/mainthread-api.test.ts b/client/shared/src/api/client/mainthread-api.test.ts index c3ade68a95c..6fde80f34a9 100644 --- a/client/shared/src/api/client/mainthread-api.test.ts +++ b/client/shared/src/api/client/mainthread-api.test.ts @@ -1,7 +1,8 @@ import { BehaviorSubject, EMPTY, of, Subject } from 'rxjs' import sinon from 'sinon' -import { getGraphQLClient as getGraphQLClientBase, SuccessGraphQLResult } from '../../graphql/graphql' +import { getGraphQLClient as getGraphQLClientBase, SuccessGraphQLResult } from '@sourcegraph/http-client' + import { PlatformContext } from '../../platform/context' import { SettingsCascade } from '../../settings/settings' import { FlatExtensionHostAPI } from '../contract' diff --git a/client/shared/src/api/contract.ts b/client/shared/src/api/contract.ts index 802a46b7e23..a7f49592f24 100644 --- a/client/shared/src/api/contract.ts +++ b/client/shared/src/api/contract.ts @@ -4,9 +4,9 @@ import * as sourcegraph from 'sourcegraph' import { MaybeLoadingResult } from '@sourcegraph/codeintellify' import { ErrorLike } from '@sourcegraph/common' import * as clientType from '@sourcegraph/extension-api-types' +import { GraphQLResult } from '@sourcegraph/http-client' import { ConfiguredExtension } from '../extensions/extension' -import { GraphQLResult } from '../graphql/graphql' import { SettingsCascade } from '../settings/settings' import { DeepReplace } from '../util/types' diff --git a/client/shared/src/backend/repo.ts b/client/shared/src/backend/repo.ts index ed6c7bd907c..803d8b6a2fe 100644 --- a/client/shared/src/backend/repo.ts +++ b/client/shared/src/backend/repo.ts @@ -1,9 +1,10 @@ import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '../graphql/graphql' -import * as GQL from '../graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' + import { PlatformContext } from '../platform/context' +import * as GQL from '../schema' import { memoizeObservable } from '../util/memoizeObservable' import { RepoSpec } from '../util/url' diff --git a/client/shared/src/components/CodeExcerpt.tsx b/client/shared/src/components/CodeExcerpt.tsx index 365921523b7..bb0b76b4352 100644 --- a/client/shared/src/components/CodeExcerpt.tsx +++ b/client/shared/src/components/CodeExcerpt.tsx @@ -8,7 +8,7 @@ import { catchError, filter, switchMap, map, distinctUntilChanged } from 'rxjs/o import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '../graphql/schema' +import * as GQL from '../schema' import { highlightNode } from '../util/dom' import { Repo } from '../util/url' diff --git a/client/shared/src/components/FileMatchChildren.tsx b/client/shared/src/components/FileMatchChildren.tsx index d77f8f8107a..5360b780f5b 100644 --- a/client/shared/src/components/FileMatchChildren.tsx +++ b/client/shared/src/components/FileMatchChildren.tsx @@ -6,7 +6,7 @@ import { map } from 'rxjs/operators' import { isErrorLike } from '@sourcegraph/common' -import { IHighlightLineRange } from '../graphql/schema' +import { IHighlightLineRange } from '../schema' import { ContentMatch, SymbolMatch, PathMatch, getFileMatchUrl } from '../search/stream' import { SettingsCascadeProps } from '../settings/settings' import { SymbolIcon } from '../symbols/SymbolIcon' diff --git a/client/shared/src/extensions/extension.ts b/client/shared/src/extensions/extension.ts index 8c6bde0bda9..238a200be91 100644 --- a/client/shared/src/extensions/extension.ts +++ b/client/shared/src/extensions/extension.ts @@ -1,6 +1,6 @@ import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '../graphql/schema' +import * as GQL from '../schema' import { Settings, SettingsCascadeOrError } from '../settings/settings' import { ExtensionManifest, parseExtensionManifestOrError } from './extensionManifest' diff --git a/client/shared/src/extensions/helpers.ts b/client/shared/src/extensions/helpers.ts index 058cbc88102..ff5a733d29b 100644 --- a/client/shared/src/extensions/helpers.ts +++ b/client/shared/src/extensions/helpers.ts @@ -2,6 +2,7 @@ import { Observable, of } from 'rxjs' import { map, switchMap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { fromObservableQueryPromise, getDocumentNode, gql } from '@sourcegraph/http-client' import { ExtensionsResult, @@ -9,7 +10,6 @@ import { ExtensionsWithPrioritizeExtensionIDsParamAndNoJSONFieldsResult, ExtensionsWithPrioritizeExtensionIDsParamAndNoJSONFieldsVariables, } from '../graphql-operations' -import { fromObservableQueryPromise, getDocumentNode, gql } from '../graphql/graphql' import { PlatformContext } from '../platform/context' import { diff --git a/client/shared/src/hover/actions.test.ts b/client/shared/src/hover/actions.test.ts index 3e55255f662..f97619c4a71 100644 --- a/client/shared/src/hover/actions.test.ts +++ b/client/shared/src/hover/actions.test.ts @@ -9,6 +9,7 @@ import * as sourcegraph from 'sourcegraph' import { HoveredToken, LOADER_DELAY, MaybeLoadingResult } from '@sourcegraph/codeintellify' import { Position, Range } from '@sourcegraph/extension-api-classes' import { Location } from '@sourcegraph/extension-api-types' +import { GraphQLResult, SuccessGraphQLResult } from '@sourcegraph/http-client' import { ActionItemAction } from '../actions/ActionItem' import { ExposedToClient } from '../api/client/mainthread-api' @@ -16,7 +17,6 @@ import { FlatExtensionHostAPI } from '../api/contract' import { WorkspaceRootWithMetadata } from '../api/extension/extensionHostApi' import { integrationTestContext } from '../api/integration-test/testHelpers' import { TextDocumentPositionParameters } from '../api/protocol' -import { GraphQLResult, SuccessGraphQLResult } from '../graphql/graphql' import { PlatformContext, URLToFileContext } from '../platform/context' import { resetAllMemoizationCaches } from '../util/memoizeObservable' import { diff --git a/client/shared/src/platform/context.ts b/client/shared/src/platform/context.ts index ce6c7019310..75bb59740e0 100644 --- a/client/shared/src/platform/context.ts +++ b/client/shared/src/platform/context.ts @@ -5,11 +5,11 @@ import { InputBoxOptions } from 'sourcegraph' import { DiffPart } from '@sourcegraph/codeintellify' import { ErrorLike } from '@sourcegraph/common' +import { GraphQLClient, GraphQLResult } from '@sourcegraph/http-client' import { SettingsEdit } from '../api/client/services/settings' import { ExecutableExtension } from '../api/extension/activation' import { Scalars } from '../graphql-operations' -import { GraphQLClient, GraphQLResult } from '../graphql/graphql' import { Settings, SettingsCascadeOrError } from '../settings/settings' import { TelemetryService } from '../telemetry/telemetryService' import { hasProperty } from '../util/types' diff --git a/client/shared/src/search/query/validate.ts b/client/shared/src/search/query/validate.ts index 49473581465..202aa9c6e36 100644 --- a/client/shared/src/search/query/validate.ts +++ b/client/shared/src/search/query/validate.ts @@ -1,4 +1,4 @@ -import { SearchPatternType } from 'src/graphql-operations' +import { SearchPatternType } from '../../graphql-operations' import { AliasedFilterType, diff --git a/client/shared/src/search/stream.ts b/client/shared/src/search/stream.ts index 6de699fc905..31a7ad69f57 100644 --- a/client/shared/src/search/stream.ts +++ b/client/shared/src/search/stream.ts @@ -7,7 +7,7 @@ import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' import { displayRepoName } from '../components/RepoFileLink' import { SearchPatternType } from '../graphql-operations' -import { SymbolKind } from '../graphql/schema' +import { SymbolKind } from '../schema' export type SearchEvent = | { type: 'matches'; data: SearchMatch[] } diff --git a/client/shared/src/settings/edit.ts b/client/shared/src/settings/edit.ts index 7219819c1a8..ea569a0715f 100644 --- a/client/shared/src/settings/edit.ts +++ b/client/shared/src/settings/edit.ts @@ -2,12 +2,12 @@ import { from } from 'rxjs' import { first, map, switchMap } from 'rxjs/operators' import { isErrorLike } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { SettingsEdit } from '../api/client/services/settings' import { Scalars } from '../graphql-operations' -import { dataOrThrowErrors, gql } from '../graphql/graphql' -import * as GQL from '../graphql/schema' import { PlatformContext } from '../platform/context' +import * as GQL from '../schema' /** * A helper function for performing an update to settings. diff --git a/client/shared/src/settings/settings.ts b/client/shared/src/settings/settings.ts index 34a0be76efc..86fcc52aeaa 100644 --- a/client/shared/src/settings/settings.ts +++ b/client/shared/src/settings/settings.ts @@ -2,7 +2,7 @@ import { cloneDeep, isFunction } from 'lodash' import { createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '../graphql/schema' +import * as GQL from '../schema' import { parseJSONCOrError } from '../util/jsonc' /** diff --git a/client/shared/src/testing/apollo/createGraphQLClientGetter.ts b/client/shared/src/testing/apollo/createGraphQLClientGetter.ts index 4d409019aaa..793931493bc 100644 --- a/client/shared/src/testing/apollo/createGraphQLClientGetter.ts +++ b/client/shared/src/testing/apollo/createGraphQLClientGetter.ts @@ -3,7 +3,8 @@ import { ObservableQuery } from '@apollo/client' import { mock } from 'jest-mock-extended' import { of, Subscriber } from 'rxjs' -import { GraphQLClient } from '../../graphql/graphql' +import { GraphQLClient } from '@sourcegraph/http-client' + import { PlatformContext } from '../../platform/context' interface CreateGraphQLClientGetterOptions { diff --git a/client/shared/src/testing/apollo/mockedTestProvider.tsx b/client/shared/src/testing/apollo/mockedTestProvider.tsx index 857eddc2b07..12f92b8dad9 100644 --- a/client/shared/src/testing/apollo/mockedTestProvider.tsx +++ b/client/shared/src/testing/apollo/mockedTestProvider.tsx @@ -1,7 +1,7 @@ import { MockedProvider, MockedProviderProps } from '@apollo/client/testing' import React, { useMemo } from 'react' -import { generateCache } from '../../graphql/apollo/cache' +import { generateCache } from '@sourcegraph/http-client' export const MockedTestProvider: React.FunctionComponent = ({ children, ...props }) => { /** diff --git a/client/shared/src/testing/driver.ts b/client/shared/src/testing/driver.ts index ee5c822e0dc..2ef43c7e66d 100644 --- a/client/shared/src/testing/driver.ts +++ b/client/shared/src/testing/driver.ts @@ -27,10 +27,10 @@ import { Key } from 'ts-key-enum' import webExt from 'web-ext' import { isDefined } from '@sourcegraph/common' +import { dataOrThrowErrors, gql, GraphQLResult } from '@sourcegraph/http-client' import { ExternalServiceKind } from '../graphql-operations' -import { dataOrThrowErrors, gql, GraphQLResult } from '../graphql/graphql' -import { IMutation, IQuery, IRepository } from '../graphql/schema' +import { IMutation, IQuery, IRepository } from '../schema' import { Settings } from '../settings/settings' import { getConfig } from './config' diff --git a/client/shared/src/testing/integration/context.ts b/client/shared/src/testing/integration/context.ts index f673042c570..5eb72a86fd8 100644 --- a/client/shared/src/testing/integration/context.ts +++ b/client/shared/src/testing/integration/context.ts @@ -14,8 +14,8 @@ import { Subject, Subscription, throwError } from 'rxjs' import { first, timeoutWith } from 'rxjs/operators' import { asError } from '@sourcegraph/common' +import { ErrorGraphQLResult, SuccessGraphQLResult } from '@sourcegraph/http-client' -import { ErrorGraphQLResult, SuccessGraphQLResult } from '../../graphql/graphql' import { keyExistsIn } from '../../util/types' import { recordCoverage } from '../coverage' import { Driver } from '../driver' diff --git a/client/shared/src/testing/searchContexts/testHelpers.ts b/client/shared/src/testing/searchContexts/testHelpers.ts index d36813266d4..f317614c00f 100644 --- a/client/shared/src/testing/searchContexts/testHelpers.ts +++ b/client/shared/src/testing/searchContexts/testHelpers.ts @@ -2,7 +2,7 @@ import { subDays } from 'date-fns' import { range } from 'lodash' import { Observable, of } from 'rxjs' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { Maybe, Scalars } from '../../graphql-operations' diff --git a/client/shared/tsconfig.json b/client/shared/tsconfig.json index 94c67681be4..b7a5daae5ff 100644 --- a/client/shared/tsconfig.json +++ b/client/shared/tsconfig.json @@ -11,7 +11,12 @@ "rootDir": ".", "outDir": "./out", }, + "references": [ + { "path": "../common" }, + { "path": "../codeintellify" }, + { "path": "../template-parser" }, + { "path": "../http-client" }, + ], "include": ["**/*", ".*", "./src/**/*.json"], "exclude": ["../../node_modules", "./node_modules", "./out", "./src/end-to-end"], - "references": [{ "path": "../common" }, { "path": "../codeintellify" }, { "path": "../template-parser" }], } diff --git a/client/storybook/src/apollo/MockedStoryProvider.tsx b/client/storybook/src/apollo/MockedStoryProvider.tsx index 286bed3953f..da06a02a38e 100644 --- a/client/storybook/src/apollo/MockedStoryProvider.tsx +++ b/client/storybook/src/apollo/MockedStoryProvider.tsx @@ -3,7 +3,7 @@ import { MockedProvider, MockedProviderProps, MockedResponse, MockLink } from '@ import { getOperationName } from '@apollo/client/utilities' import React from 'react' -import { cache } from '@sourcegraph/shared/src/graphql/apollo/cache' +import { cache } from '@sourcegraph/http-client' /** * Intercept each mocked Apollo request and ensure that any request variables match the specified mock. diff --git a/client/storybook/tsconfig.json b/client/storybook/tsconfig.json index fb8f29e6ea0..d20d27cb6f1 100644 --- a/client/storybook/tsconfig.json +++ b/client/storybook/tsconfig.json @@ -8,6 +8,6 @@ "baseUrl": "./src", "jsx": "react", }, - "references": [{ "path": "../shared" }, { "path": "../build-config" }], + "references": [{ "path": "../shared" }, { "path": "../build-config" }, { "path": "../http-client" }], "include": ["./src/**/*", "./*.ts"], } diff --git a/client/web/src/Layout.tsx b/client/web/src/Layout.tsx index 8a970e7fb23..8cb38b1121b 100644 --- a/client/web/src/Layout.tsx +++ b/client/web/src/Layout.tsx @@ -6,8 +6,8 @@ import { ResizablePanel } from '@sourcegraph/branded/src/components/panel/Panel' import { ActivationProps } from '@sourcegraph/shared/src/components/activation/Activation' import { FetchFileParameters } from '@sourcegraph/shared/src/components/CodeExcerpt' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { getGlobalSearchContextFilter } from '@sourcegraph/shared/src/search/query/query' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/SourcegraphWebApp.tsx b/client/web/src/SourcegraphWebApp.tsx index 0f9bce2383c..c08f3ea6f89 100644 --- a/client/web/src/SourcegraphWebApp.tsx +++ b/client/web/src/SourcegraphWebApp.tsx @@ -11,16 +11,15 @@ import { combineLatest, from, Subscription, fromEvent, of, Subject } from 'rxjs' import { catchError, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' +import { GraphQLClient, HTTPStatusError } from '@sourcegraph/http-client' import { getEnabledExtensions } from '@sourcegraph/shared/src/api/client/enabledExtensions' import { preloadExtensions } from '@sourcegraph/shared/src/api/client/preload' import { NotificationType } from '@sourcegraph/shared/src/api/extension/extensionHostApi' -import { HTTPStatusError } from '@sourcegraph/shared/src/backend/fetch' import { setLinkComponent } from '@sourcegraph/shared/src/components/Link' import { Controller as ExtensionsController, createController as createExtensionsController, } from '@sourcegraph/shared/src/extensions/controller' -import { GraphQLClient } from '@sourcegraph/shared/src/graphql/graphql' import { getModeFromPath } from '@sourcegraph/shared/src/languages' import { Notifications } from '@sourcegraph/shared/src/notifications/Notifications' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' diff --git a/client/web/src/auth.ts b/client/web/src/auth.ts index e3d55466507..e7315f58241 100644 --- a/client/web/src/auth.ts +++ b/client/web/src/auth.ts @@ -1,7 +1,7 @@ import { Observable, ReplaySubject } from 'rxjs' import { catchError, map, mergeMap, tap } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from './backend/graphql' import { CurrentAuthStateResult } from './graphql-operations' diff --git a/client/web/src/auth/useAffiliatedRepos.ts b/client/web/src/auth/useAffiliatedRepos.ts index 508c463c36b..f33b69606a3 100644 --- a/client/web/src/auth/useAffiliatedRepos.ts +++ b/client/web/src/auth/useAffiliatedRepos.ts @@ -1,6 +1,6 @@ import { ApolloError, ApolloQueryResult } from '@apollo/client' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { Maybe, AffiliatedRepositoriesResult, AffiliatedRepositoriesVariables, Exact } from '../graphql-operations' diff --git a/client/web/src/auth/useExternalServices.ts b/client/web/src/auth/useExternalServices.ts index 5056b15b31d..7c9410c0695 100644 --- a/client/web/src/auth/useExternalServices.ts +++ b/client/web/src/auth/useExternalServices.ts @@ -1,6 +1,6 @@ import { ApolloError, ApolloQueryResult } from '@apollo/client' -import { useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { useQuery } from '@sourcegraph/http-client' import { EXTERNAL_SERVICES } from '@sourcegraph/web/src/components/externalServices/backend' import { diff --git a/client/web/src/auth/useRepoCloningStatus.ts b/client/web/src/auth/useRepoCloningStatus.ts index 38e65ca15d2..c524e564ee1 100644 --- a/client/web/src/auth/useRepoCloningStatus.ts +++ b/client/web/src/auth/useRepoCloningStatus.ts @@ -1,7 +1,7 @@ import { ApolloError, ReactiveVar } from '@apollo/client' import { upperFirst, xor } from 'lodash' -import { useQuery, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { useQuery, gql } from '@sourcegraph/http-client' import { Maybe, UserRepositoriesVariables } from '../graphql-operations' diff --git a/client/web/src/auth/useSelectedRepos.tsx b/client/web/src/auth/useSelectedRepos.tsx index 58b585d5fe4..d8582ca62aa 100644 --- a/client/web/src/auth/useSelectedRepos.tsx +++ b/client/web/src/auth/useSelectedRepos.tsx @@ -1,6 +1,6 @@ import { ApolloError, ApolloQueryResult, gql, MutationFunctionOptions, FetchResult, makeVar } from '@apollo/client' -import { useQuery, useMutation } from '@sourcegraph/shared/src/graphql/graphql' +import { useQuery, useMutation } from '@sourcegraph/http-client' import { Maybe, diff --git a/client/web/src/backend/diff.ts b/client/web/src/backend/diff.ts index f648114f233..c2f0dbc1d30 100644 --- a/client/web/src/backend/diff.ts +++ b/client/web/src/backend/diff.ts @@ -1,4 +1,4 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' export const fileDiffHunkRangeFields = gql` fragment FileDiffHunkRangeFields on FileDiffHunkRange { diff --git a/client/web/src/backend/graphql.ts b/client/web/src/backend/graphql.ts index a0f3cf59813..72246882ce0 100644 --- a/client/web/src/backend/graphql.ts +++ b/client/web/src/backend/graphql.ts @@ -1,8 +1,8 @@ import { memoize } from 'lodash' import { Observable } from 'rxjs' -import { getGraphQLClient, GraphQLResult, requestGraphQLCommon } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { getGraphQLClient, GraphQLResult, requestGraphQLCommon } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' const getHeaders = (): { [header: string]: string } => ({ ...window?.context?.xhrHeaders, diff --git a/client/web/src/batches/backend.ts b/client/web/src/batches/backend.ts index cf68bdda2da..e15974d0084 100644 --- a/client/web/src/batches/backend.ts +++ b/client/web/src/batches/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../backend/graphql' import { RepoChangesetsStatsVariables, RepoChangesetsStatsResult } from '../graphql-operations' diff --git a/client/web/src/communitySearchContexts/CommunitySearchContextPage.story.tsx b/client/web/src/communitySearchContexts/CommunitySearchContextPage.story.tsx index 2cb1fe583d7..39b8ad31ee8 100644 --- a/client/web/src/communitySearchContexts/CommunitySearchContextPage.story.tsx +++ b/client/web/src/communitySearchContexts/CommunitySearchContextPage.story.tsx @@ -5,8 +5,8 @@ import React from 'react' import { NEVER, Observable, of } from 'rxjs' import { ActionItemComponentProps } from '@sourcegraph/shared/src/actions/ActionItem' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' -import { IRepository, ISearchContext, ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' +import { IRepository, ISearchContext, ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/schema' import { mockFetchAutoDefinedSearchContexts, mockFetchSearchContexts, diff --git a/client/web/src/components/FilteredConnection/hooks/useConnection.test.tsx b/client/web/src/components/FilteredConnection/hooks/useConnection.test.tsx index aa14508a3da..8ed0b6180fc 100644 --- a/client/web/src/components/FilteredConnection/hooks/useConnection.test.tsx +++ b/client/web/src/components/FilteredConnection/hooks/useConnection.test.tsx @@ -2,7 +2,7 @@ import { MockedResponse } from '@apollo/client/testing' import { fireEvent } from '@testing-library/react' import React from 'react' -import { dataOrThrowErrors, getDocumentNode, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, getDocumentNode, gql } from '@sourcegraph/http-client' import { MockedTestProvider, waitForNextApolloResponse } from '@sourcegraph/shared/src/testing/apollo' import { renderWithRouter, RenderWithRouterResult } from '@sourcegraph/shared/src/testing/render-with-router' diff --git a/client/web/src/components/FilteredConnection/hooks/useConnection.ts b/client/web/src/components/FilteredConnection/hooks/useConnection.ts index 31edd12da0e..eece7b87b3b 100644 --- a/client/web/src/components/FilteredConnection/hooks/useConnection.ts +++ b/client/web/src/components/FilteredConnection/hooks/useConnection.ts @@ -1,7 +1,7 @@ import { ApolloError, QueryResult, WatchQueryFetchPolicy } from '@apollo/client' import { useCallback, useMemo, useRef } from 'react' -import { GraphQLResult, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { GraphQLResult, useQuery } from '@sourcegraph/http-client' import { asGraphQLResult, hasNextPage, parseQueryInt } from '@sourcegraph/web/src/components/FilteredConnection/utils' import { useSearchParameters, useInterval } from '@sourcegraph/wildcard' diff --git a/client/web/src/components/FilteredConnection/utils.ts b/client/web/src/components/FilteredConnection/utils.ts index 5fc67756776..6da1069e5ac 100644 --- a/client/web/src/components/FilteredConnection/utils.ts +++ b/client/web/src/components/FilteredConnection/utils.ts @@ -1,8 +1,8 @@ import { GraphQLError } from 'graphql' import type { Location } from 'history' +import { GraphQLResult } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { GraphQLResult } from '@sourcegraph/shared/src/graphql/graphql' import { hasProperty } from '@sourcegraph/shared/src/util/types' import { Connection } from './ConnectionType' diff --git a/client/web/src/components/externalServices/ExternalServiceForm.test.tsx b/client/web/src/components/externalServices/ExternalServiceForm.test.tsx index f6a49fa5fee..21ece433a5e 100644 --- a/client/web/src/components/externalServices/ExternalServiceForm.test.tsx +++ b/client/web/src/components/externalServices/ExternalServiceForm.test.tsx @@ -7,7 +7,7 @@ import * as H from 'history' import React from 'react' import { noop } from 'rxjs' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ExternalServiceForm } from './ExternalServiceForm' diff --git a/client/web/src/components/externalServices/ExternalServicePage.tsx b/client/web/src/components/externalServices/ExternalServicePage.tsx index 444d043dfe1..f22d03ba225 100644 --- a/client/web/src/components/externalServices/ExternalServicePage.tsx +++ b/client/web/src/components/externalServices/ExternalServicePage.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useState, useCallback } from 'react' import { catchError } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { hasProperty } from '@sourcegraph/shared/src/util/types' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/components/externalServices/backend.ts b/client/web/src/components/externalServices/backend.ts index 9d282074faf..c7159642b5a 100644 --- a/client/web/src/components/externalServices/backend.ts +++ b/client/web/src/components/externalServices/backend.ts @@ -2,7 +2,7 @@ import { Observable } from 'rxjs' import { map, mapTo } from 'rxjs/operators' import { createAggregateError, isErrorLike, ErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { TelemetryService } from '@sourcegraph/shared/src/telemetry/telemetryService' import { requestGraphQL } from '../../backend/graphql' diff --git a/client/web/src/components/fuzzyFinder/FuzzyFinder.tsx b/client/web/src/components/fuzzyFinder/FuzzyFinder.tsx index 00acc69bd7f..89c9b82f6c8 100644 --- a/client/web/src/components/fuzzyFinder/FuzzyFinder.tsx +++ b/client/web/src/components/fuzzyFinder/FuzzyFinder.tsx @@ -3,7 +3,7 @@ import * as H from 'history' import React, { useState, useEffect, Dispatch, SetStateAction } from 'react' import { useHistory } from 'react-router-dom' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, getDocumentNode } from '@sourcegraph/http-client' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { FuzzySearch, SearchIndexing } from '../../fuzzyFinder/FuzzySearch' diff --git a/client/web/src/end-to-end/end-to-end.test.ts b/client/web/src/end-to-end/end-to-end.test.ts index acfc1a230b2..22a13aeb626 100644 --- a/client/web/src/end-to-end/end-to-end.test.ts +++ b/client/web/src/end-to-end/end-to-end.test.ts @@ -3,7 +3,7 @@ import { sortBy } from 'lodash' import { describe, test, before, beforeEach, after } from 'mocha' import MockDate from 'mockdate' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { getConfig } from '@sourcegraph/shared/src/testing/config' import { afterEachRecordCoverage } from '@sourcegraph/shared/src/testing/coverage' import { createDriverForTest, Driver, percySnapshot } from '@sourcegraph/shared/src/testing/driver' diff --git a/client/web/src/enterprise/batches/close/backend.ts b/client/web/src/enterprise/batches/close/backend.ts index c1f3b8d7bcd..1248a134903 100644 --- a/client/web/src/enterprise/batches/close/backend.ts +++ b/client/web/src/enterprise/batches/close/backend.ts @@ -1,4 +1,4 @@ -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { CloseBatchChangeResult, CloseBatchChangeVariables } from '../../../graphql-operations' diff --git a/client/web/src/enterprise/batches/create/CreateOrEditBatchChangePage.tsx b/client/web/src/enterprise/batches/create/CreateOrEditBatchChangePage.tsx index 91b76e8e20a..d08f13bfbfc 100644 --- a/client/web/src/enterprise/batches/create/CreateOrEditBatchChangePage.tsx +++ b/client/web/src/enterprise/batches/create/CreateOrEditBatchChangePage.tsx @@ -5,7 +5,7 @@ import AlertCircleIcon from 'mdi-react/AlertCircleIcon' import React, { useCallback, useMemo, useState } from 'react' import { useHistory } from 'react-router' -import { useMutation, useQuery } from '@sourcegraph/shared/src/graphql/apollo' +import { useMutation, useQuery } from '@sourcegraph/http-client' import { SettingsCascadeProps, SettingsOrgSubject, diff --git a/client/web/src/enterprise/batches/create/backend.ts b/client/web/src/enterprise/batches/create/backend.ts index 3aa57081c34..8a25e27e0c4 100644 --- a/client/web/src/enterprise/batches/create/backend.ts +++ b/client/web/src/enterprise/batches/create/backend.ts @@ -1,4 +1,4 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' export const GET_BATCH_CHANGE_TO_EDIT = gql` query GetBatchChangeToEdit($namespace: ID!, $name: String!) { diff --git a/client/web/src/enterprise/batches/create/useBatchSpecPreview.ts b/client/web/src/enterprise/batches/create/useBatchSpecPreview.ts index 48d800fedf5..4f31a33c2a5 100644 --- a/client/web/src/enterprise/batches/create/useBatchSpecPreview.ts +++ b/client/web/src/enterprise/batches/create/useBatchSpecPreview.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo, useState } from 'react' +import { useMutation } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { useMutation } from '@sourcegraph/shared/src/graphql/graphql' import { CreateBatchSpecFromRawResult, diff --git a/client/web/src/enterprise/batches/create/useExecuteBatchSpec.ts b/client/web/src/enterprise/batches/create/useExecuteBatchSpec.ts index 3df2e13d2a7..e72ea19fbc3 100644 --- a/client/web/src/enterprise/batches/create/useExecuteBatchSpec.ts +++ b/client/web/src/enterprise/batches/create/useExecuteBatchSpec.ts @@ -1,8 +1,8 @@ import { useCallback, useState } from 'react' import { useHistory } from 'react-router' +import { useMutation } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { useMutation } from '@sourcegraph/shared/src/graphql/graphql' import { ExecuteBatchSpecResult, ExecuteBatchSpecVariables } from '../../../graphql-operations' diff --git a/client/web/src/enterprise/batches/create/workspaces-preview/ImportingChangesetsPreviewList.tsx b/client/web/src/enterprise/batches/create/workspaces-preview/ImportingChangesetsPreviewList.tsx index 8998674ca04..aa2079204dc 100644 --- a/client/web/src/enterprise/batches/create/workspaces-preview/ImportingChangesetsPreviewList.tsx +++ b/client/web/src/enterprise/batches/create/workspaces-preview/ImportingChangesetsPreviewList.tsx @@ -1,8 +1,8 @@ import ImportIcon from 'mdi-react/ImportIcon' import React from 'react' +import { dataOrThrowErrors } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { useConnection, UseConnectionResult, diff --git a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.story.tsx b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.story.tsx index f21a7966737..6d5e11c34a9 100644 --- a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.story.tsx +++ b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.story.tsx @@ -4,8 +4,8 @@ import { noop } from 'lodash' import React from 'react' import { MATCH_ANY_PARAMETERS, WildcardMockedResponse, WildcardMockLink } from 'wildcard-mock-link' +import { getDocumentNode } from '@sourcegraph/http-client' import { BatchSpecWorkspaceResolutionState } from '@sourcegraph/shared/src/graphql-operations' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/apollo' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' import { WebStory } from '@sourcegraph/web/src/components/WebStory' diff --git a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.tsx b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.tsx index 0b3eab93add..2f4b6375f8b 100644 --- a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.tsx +++ b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreview.tsx @@ -1,7 +1,7 @@ import { ApolloError, WatchQueryFetchPolicy } from '@apollo/client' import React, { useCallback, useEffect, useMemo, useState } from 'react' -import { useQuery } from '@sourcegraph/shared/src/graphql/apollo' +import { useQuery } from '@sourcegraph/http-client' import { ErrorAlert } from '@sourcegraph/web/src/components/alerts' import { diff --git a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreviewList.tsx b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreviewList.tsx index afe008fcf18..395d0b83ba9 100644 --- a/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreviewList.tsx +++ b/client/web/src/enterprise/batches/create/workspaces-preview/WorkspacesPreviewList.tsx @@ -1,6 +1,6 @@ import React from 'react' -import { dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors } from '@sourcegraph/http-client' import { useConnection, UseConnectionResult, diff --git a/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.story.tsx b/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.story.tsx index 6fd0b5a1867..08c1910fe56 100644 --- a/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.story.tsx +++ b/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.story.tsx @@ -6,7 +6,7 @@ import React from 'react' import { of } from 'rxjs' import { MATCH_ANY_PARAMETERS, WildcardMockLink } from 'wildcard-mock-link' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/apollo' +import { getDocumentNode } from '@sourcegraph/http-client' import { EMPTY_SETTINGS_CASCADE } from '@sourcegraph/shared/src/settings/settings' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' diff --git a/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.tsx b/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.tsx index c3e73af53a8..53e97375b5b 100644 --- a/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.tsx +++ b/client/web/src/enterprise/batches/detail/BatchChangeDetailsPage.tsx @@ -2,8 +2,8 @@ import { subDays, startOfDay } from 'date-fns' import AlertCircleIcon from 'mdi-react/AlertCircleIcon' import React, { useEffect, useMemo } from 'react' +import { useQuery } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { useQuery } from '@sourcegraph/shared/src/graphql/apollo' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { ErrorMessage } from '@sourcegraph/web/src/components/alerts' import { PageHeader, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/batches/detail/BulkOperationsTab.tsx b/client/web/src/enterprise/batches/detail/BulkOperationsTab.tsx index 89d6e8f64ff..b051eeec462 100644 --- a/client/web/src/enterprise/batches/detail/BulkOperationsTab.tsx +++ b/client/web/src/enterprise/batches/detail/BulkOperationsTab.tsx @@ -1,8 +1,8 @@ import MapSearchIcon from 'mdi-react/MapSearchIcon' import React, { useEffect } from 'react' +import { dataOrThrowErrors } from '@sourcegraph/http-client' import { BulkOperationState } from '@sourcegraph/shared/src/graphql-operations' -import { dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { useConnection, UseConnectionResult, diff --git a/client/web/src/enterprise/batches/detail/backend.ts b/client/web/src/enterprise/batches/detail/backend.ts index d5cd2aa9e1a..e40c6792b02 100644 --- a/client/web/src/enterprise/batches/detail/backend.ts +++ b/client/web/src/enterprise/batches/detail/backend.ts @@ -1,7 +1,7 @@ import { EMPTY, Observable } from 'rxjs' import { expand, map, reduce } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { diffStatFields, fileDiffFields } from '../../../backend/diff' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.story.tsx b/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.story.tsx index fdf110bbd47..659047d337f 100644 --- a/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.story.tsx +++ b/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.story.tsx @@ -5,7 +5,7 @@ import React from 'react' import { of } from 'rxjs' import { WildcardMockLink, MATCH_ANY_PARAMETERS } from 'wildcard-mock-link' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/apollo' +import { getDocumentNode } from '@sourcegraph/http-client' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' import { WebStory } from '../../../../components/WebStory' diff --git a/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.tsx b/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.tsx index cea04427d4b..3a0a6114297 100644 --- a/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.tsx +++ b/client/web/src/enterprise/batches/detail/changesets/BatchChangeChangesets.tsx @@ -5,10 +5,10 @@ import { withLatestFrom, map, filter } from 'rxjs/operators' import { createHoverifier } from '@sourcegraph/codeintellify' import { isDefined } from '@sourcegraph/common' +import { dataOrThrowErrors } from '@sourcegraph/http-client' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { HoverMerged } from '@sourcegraph/shared/src/api/client/types/hover' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { getHoverActions } from '@sourcegraph/shared/src/hover/actions' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/enterprise/batches/execution/BatchSpecExecutionDetailsPage.tsx b/client/web/src/enterprise/batches/execution/BatchSpecExecutionDetailsPage.tsx index b9b52189f9e..913078721c0 100644 --- a/client/web/src/enterprise/batches/execution/BatchSpecExecutionDetailsPage.tsx +++ b/client/web/src/enterprise/batches/execution/BatchSpecExecutionDetailsPage.tsx @@ -6,10 +6,10 @@ import { Redirect, Route, RouteComponentProps, Switch, useHistory, useLocation } import { NavLink as RouterLink } from 'react-router-dom' import { asError, isErrorLike } from '@sourcegraph/common' +import { useQuery } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' import { BatchSpecState } from '@sourcegraph/shared/src/graphql-operations' -import { useQuery } from '@sourcegraph/shared/src/graphql/apollo' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { Button, LoadingSpinner, PageHeader, FeedbackBadge } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/batches/execution/backend.ts b/client/web/src/enterprise/batches/execution/backend.ts index 26ea57d4b45..6e185f7b356 100644 --- a/client/web/src/enterprise/batches/execution/backend.ts +++ b/client/web/src/enterprise/batches/execution/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { fileDiffFields } from '../../../backend/diff' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/batches/list/backend.ts b/client/web/src/enterprise/batches/list/backend.ts index 553bbbd2449..dc5cf505650 100644 --- a/client/web/src/enterprise/batches/list/backend.ts +++ b/client/web/src/enterprise/batches/list/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { diff --git a/client/web/src/enterprise/batches/preview/backend.ts b/client/web/src/enterprise/batches/preview/backend.ts index e9bb1461cfe..f029708c9dc 100644 --- a/client/web/src/enterprise/batches/preview/backend.ts +++ b/client/web/src/enterprise/batches/preview/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { diffStatFields } from '../../../backend/diff' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/batches/preview/list/backend.ts b/client/web/src/enterprise/batches/preview/list/backend.ts index e62e8aff708..3de8cf152e5 100644 --- a/client/web/src/enterprise/batches/preview/list/backend.ts +++ b/client/web/src/enterprise/batches/preview/list/backend.ts @@ -1,7 +1,7 @@ import { EMPTY, Observable } from 'rxjs' import { expand, map, reduce } from 'rxjs/operators' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { diffStatFields, fileDiffFields } from '../../../../backend/diff' import { requestGraphQL } from '../../../../backend/graphql' diff --git a/client/web/src/enterprise/batches/repo/backend.ts b/client/web/src/enterprise/batches/repo/backend.ts index 3da50ab33fb..e2447b30a5c 100644 --- a/client/web/src/enterprise/batches/repo/backend.ts +++ b/client/web/src/enterprise/batches/repo/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { diff --git a/client/web/src/enterprise/batches/settings/backend.ts b/client/web/src/enterprise/batches/settings/backend.ts index 81e203ca610..008b7eba04a 100644 --- a/client/web/src/enterprise/batches/settings/backend.ts +++ b/client/web/src/enterprise/batches/settings/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map, mapTo } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { diff --git a/client/web/src/enterprise/code-monitoring/backend.ts b/client/web/src/enterprise/code-monitoring/backend.ts index 7849f86a110..1b7caac249d 100644 --- a/client/web/src/enterprise/code-monitoring/backend.ts +++ b/client/web/src/enterprise/code-monitoring/backend.ts @@ -1,11 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { - createInvalidGraphQLMutationResponseError, - dataOrThrowErrors, - gql, -} from '@sourcegraph/shared/src/graphql/graphql' +import { createInvalidGraphQLMutationResponseError, dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../backend/graphql' import { diff --git a/client/web/src/enterprise/codeintel/configuration/components/GitObjectTargetDescription.tsx b/client/web/src/enterprise/codeintel/configuration/components/GitObjectTargetDescription.tsx index 5f73a58b6e3..710c1bedca9 100644 --- a/client/web/src/enterprise/codeintel/configuration/components/GitObjectTargetDescription.tsx +++ b/client/web/src/enterprise/codeintel/configuration/components/GitObjectTargetDescription.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent } from 'react' -import { GitObjectType } from '@sourcegraph/shared/src/graphql/schema' +import { GitObjectType } from '@sourcegraph/shared/src/schema' import { CodeIntelligenceConfigurationPolicyFields } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/queryPolicies.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/queryPolicies.tsx index 23d7148c542..0473100d143 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/queryPolicies.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/queryPolicies.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { getDocumentNode, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { getDocumentNode, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { CodeIntelligenceConfigurationPoliciesResult, diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/types.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/types.tsx index 60028ed007e..b1f7aeeb396 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/types.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/types.tsx @@ -1,4 +1,4 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' import { GitObjectType } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/useDeletePolicies.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/useDeletePolicies.tsx index c7e996551c6..c43f9ab5266 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/useDeletePolicies.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/useDeletePolicies.tsx @@ -1,6 +1,6 @@ import { ApolloError, FetchResult, MutationFunctionOptions } from '@apollo/client' -import { gql, useMutation } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useMutation } from '@sourcegraph/http-client' import { DeleteCodeIntelligenceConfigurationPolicyResult, diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/useInferredConfig.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/useInferredConfig.tsx index 64e08fa1cb2..d87a4105555 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/useInferredConfig.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/useInferredConfig.tsx @@ -1,6 +1,6 @@ import { ApolloError } from '@apollo/client' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { InferredIndexConfigurationResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx index a4c836a03ac..72c075b7ab2 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/usePolicyConfigurationById.tsx @@ -1,6 +1,6 @@ import { ApolloError } from '@apollo/client' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { CodeIntelligenceConfigurationPolicyFields, diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewGitObjectFilter.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewGitObjectFilter.tsx index 0e508dfcd51..105de4b328e 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewGitObjectFilter.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewGitObjectFilter.tsx @@ -1,7 +1,7 @@ import { ApolloError } from '@apollo/client' +import { gql, useQuery } from '@sourcegraph/http-client' import { GitObjectType, Maybe } from '@sourcegraph/shared/src/graphql-operations' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' import { PreviewGitObjectFilterResult, PreviewGitObjectFilterVariables } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewRepositoryFilter.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewRepositoryFilter.tsx index 1b8676783f1..48816389bc1 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewRepositoryFilter.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/usePreviewRepositoryFilter.tsx @@ -1,6 +1,6 @@ import { ApolloError } from '@apollo/client' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { PreviewRepositoryFilterResult, PreviewRepositoryFilterVariables } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/useRepositoryConfig.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/useRepositoryConfig.tsx index d5936d06e0f..fa1a5e46b25 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/useRepositoryConfig.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/useRepositoryConfig.tsx @@ -1,6 +1,6 @@ import { ApolloError } from '@apollo/client' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { IndexConfigurationResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx index 93e829345fe..8bcbec14af1 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/useSavePolicyConfiguration.tsx @@ -1,6 +1,6 @@ import { ApolloError, FetchResult, MutationFunctionOptions, OperationVariables } from '@apollo/client' -import { gql, useMutation } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useMutation } from '@sourcegraph/http-client' import { UpdateCodeIntelligenceConfigurationPolicyResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/hooks/useUpdateConfigurationForRepository.tsx b/client/web/src/enterprise/codeintel/configuration/hooks/useUpdateConfigurationForRepository.tsx index 5341dfe955b..e9a3ec2c0e2 100644 --- a/client/web/src/enterprise/codeintel/configuration/hooks/useUpdateConfigurationForRepository.tsx +++ b/client/web/src/enterprise/codeintel/configuration/hooks/useUpdateConfigurationForRepository.tsx @@ -1,6 +1,6 @@ import { ApolloError, FetchResult, MutationFunctionOptions, OperationVariables } from '@apollo/client' -import { gql, useMutation } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useMutation } from '@sourcegraph/http-client' import { UpdateRepositoryIndexConfigurationResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.story.tsx b/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.story.tsx index de9eaff230a..571df15400e 100644 --- a/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.story.tsx +++ b/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPage.story.tsx @@ -3,8 +3,8 @@ import { boolean, withKnobs } from '@storybook/addon-knobs' import { Meta, Story } from '@storybook/react' import React from 'react' +import { getDocumentNode } from '@sourcegraph/http-client' import { GitObjectType } from '@sourcegraph/shared/src/graphql-operations' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' import { WebStory } from '@sourcegraph/web/src/components/WebStory' import { diff --git a/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.story.tsx b/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.story.tsx index 0abb9c075eb..f4c4687fea6 100644 --- a/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.story.tsx +++ b/client/web/src/enterprise/codeintel/configuration/pages/CodeIntelConfigurationPolicyPage.story.tsx @@ -2,8 +2,8 @@ import { boolean, withKnobs } from '@storybook/addon-knobs' import { Meta, Story } from '@storybook/react' import React from 'react' +import { getDocumentNode } from '@sourcegraph/http-client' import { GitObjectType } from '@sourcegraph/shared/src/graphql-operations' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' import { WebStory } from '@sourcegraph/web/src/components/WebStory' import { CodeIntelligenceConfigurationPolicyFields } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/queryCommitGraphMetadata.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/queryCommitGraphMetadata.tsx index 7c530174acf..c2452cd4c0d 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/queryCommitGraphMetadata.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/queryCommitGraphMetadata.tsx @@ -3,7 +3,7 @@ import { parseISO } from 'date-fns' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, getDocumentNode } from '@sourcegraph/http-client' import { CodeIntelligenceCommitGraphMetadataResult, diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/queryLisfIndex.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/queryLisfIndex.tsx index acb780d69b8..0a44a0982e9 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/queryLisfIndex.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/queryLisfIndex.tsx @@ -3,8 +3,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { ErrorLike } from '@sourcegraph/common' -import { fromObservableQuery } from '@sourcegraph/shared/src/graphql/apollo' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { fromObservableQuery, gql, getDocumentNode } from '@sourcegraph/http-client' import { LsifIndexFields, LsifIndexResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexList.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexList.tsx index 32cc3441ef8..e8b97cbfd37 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexList.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexList.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, getDocumentNode } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { LsifIndexesResult, LsifIndexesVariables, LsifIndexFields } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexListByRepository.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexListByRepository.tsx index a8186389d3b..3320baf08b8 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexListByRepository.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/queryLsifIndexListByRepository.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, getDocumentNode } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { LsifIndexesForRepoResult, LsifIndexesForRepoVariables, LsifIndexFields } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/types.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/types.tsx index 8a4261020a9..0304cd2e816 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/types.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/types.tsx @@ -1,4 +1,4 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' export const lsifIndexFieldsFragment = gql` fragment LsifIndexFields on LSIFIndex { diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/useDeleteLsifIndex.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/useDeleteLsifIndex.tsx index 1c84e70ac30..cae23fcd1eb 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/useDeleteLsifIndex.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/useDeleteLsifIndex.tsx @@ -1,6 +1,6 @@ import { ApolloError, MutationFunctionOptions, FetchResult, useMutation } from '@apollo/client' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, getDocumentNode } from '@sourcegraph/http-client' import { DeleteLsifIndexResult, DeleteLsifIndexVariables, Exact } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/indexes/hooks/useEnqueueIndexJob.tsx b/client/web/src/enterprise/codeintel/indexes/hooks/useEnqueueIndexJob.tsx index 6e301978cd1..4fe2b5c00c6 100644 --- a/client/web/src/enterprise/codeintel/indexes/hooks/useEnqueueIndexJob.tsx +++ b/client/web/src/enterprise/codeintel/indexes/hooks/useEnqueueIndexJob.tsx @@ -1,6 +1,6 @@ import { MutationFunctionOptions, FetchResult, useMutation } from '@apollo/client' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, getDocumentNode } from '@sourcegraph/http-client' import { QueueAutoIndexJobsForRepoVariables, diff --git a/client/web/src/enterprise/codeintel/indexes/pages/CodeIntelIndexPage.story.tsx b/client/web/src/enterprise/codeintel/indexes/pages/CodeIntelIndexPage.story.tsx index 68868721848..41ba0c4ae4e 100644 --- a/client/web/src/enterprise/codeintel/indexes/pages/CodeIntelIndexPage.story.tsx +++ b/client/web/src/enterprise/codeintel/indexes/pages/CodeIntelIndexPage.story.tsx @@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/react' import React from 'react' import { of } from 'rxjs' -import { LSIFUploadState } from '@sourcegraph/shared/src/graphql/schema' +import { LSIFUploadState } from '@sourcegraph/shared/src/schema' import { WebStory } from '../../../../components/WebStory' import { LsifIndexFields, LSIFIndexState, LsifIndexStepsFields } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/uploads/hooks/queryLisfUploadFields.tsx b/client/web/src/enterprise/codeintel/uploads/hooks/queryLisfUploadFields.tsx index 70e6316b402..b171993ba1f 100644 --- a/client/web/src/enterprise/codeintel/uploads/hooks/queryLisfUploadFields.tsx +++ b/client/web/src/enterprise/codeintel/uploads/hooks/queryLisfUploadFields.tsx @@ -3,8 +3,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { ErrorLike } from '@sourcegraph/common' -import { fromObservableQuery } from '@sourcegraph/shared/src/graphql/apollo' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { fromObservableQuery, gql, getDocumentNode } from '@sourcegraph/http-client' import { LsifUploadFields, LsifUploadResult } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsByRepository.tsx b/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsByRepository.tsx index 6247300dc94..7362257c537 100644 --- a/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsByRepository.tsx +++ b/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsByRepository.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, getDocumentNode } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { LSIFUploadState, diff --git a/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsList.tsx b/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsList.tsx index 8409f97f7ea..d0310c402c3 100644 --- a/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsList.tsx +++ b/client/web/src/enterprise/codeintel/uploads/hooks/queryLsifUploadsList.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, getDocumentNode } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { LSIFUploadState, diff --git a/client/web/src/enterprise/codeintel/uploads/hooks/types.tsx b/client/web/src/enterprise/codeintel/uploads/hooks/types.tsx index 5700319060c..03a873f8bfe 100644 --- a/client/web/src/enterprise/codeintel/uploads/hooks/types.tsx +++ b/client/web/src/enterprise/codeintel/uploads/hooks/types.tsx @@ -1,4 +1,4 @@ -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' export const lsifUploadFieldsFragment = gql` fragment LsifUploadFields on LSIFUpload { diff --git a/client/web/src/enterprise/codeintel/uploads/hooks/useDeleteLsifUpload.tsx b/client/web/src/enterprise/codeintel/uploads/hooks/useDeleteLsifUpload.tsx index f421bf1e02c..6a2a08e396a 100644 --- a/client/web/src/enterprise/codeintel/uploads/hooks/useDeleteLsifUpload.tsx +++ b/client/web/src/enterprise/codeintel/uploads/hooks/useDeleteLsifUpload.tsx @@ -1,6 +1,6 @@ import { ApolloError, MutationFunctionOptions, FetchResult, useMutation } from '@apollo/client' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, getDocumentNode } from '@sourcegraph/http-client' import { DeleteLsifUploadResult, DeleteLsifUploadVariables, Exact } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/codeintel/uploads/pages/CodeIntelUploadPage.story.tsx b/client/web/src/enterprise/codeintel/uploads/pages/CodeIntelUploadPage.story.tsx index fb932b8b370..72f63b788f2 100644 --- a/client/web/src/enterprise/codeintel/uploads/pages/CodeIntelUploadPage.story.tsx +++ b/client/web/src/enterprise/codeintel/uploads/pages/CodeIntelUploadPage.story.tsx @@ -2,7 +2,7 @@ import { Meta, Story } from '@storybook/react' import React from 'react' import { of } from 'rxjs' -import { LSIFIndexState } from '@sourcegraph/shared/src/graphql/schema' +import { LSIFIndexState } from '@sourcegraph/shared/src/schema' import { WebStory } from '../../../../components/WebStory' import { LsifUploadFields, LSIFUploadState } from '../../../../graphql-operations' diff --git a/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.test.tsx b/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.test.tsx index e072e877a6e..1b749eb761b 100644 --- a/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.test.tsx +++ b/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.test.tsx @@ -2,7 +2,7 @@ import { render, act } from '@testing-library/react' import React from 'react' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { ProductPlanFormControl } from './ProductPlanFormControl' diff --git a/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.tsx b/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.tsx index 1b4aba8d2b2..c2f15c0b558 100644 --- a/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.tsx +++ b/client/web/src/enterprise/dotcom/productPlans/ProductPlanFormControl.tsx @@ -4,8 +4,8 @@ import { Observable } from 'rxjs' import { catchError, map, startWith, tap } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { RadioButton, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/dotcom/productPlans/ProductPlanPrice.tsx b/client/web/src/enterprise/dotcom/productPlans/ProductPlanPrice.tsx index 9951ba6195b..00a55d5788c 100644 --- a/client/web/src/enterprise/dotcom/productPlans/ProductPlanPrice.tsx +++ b/client/web/src/enterprise/dotcom/productPlans/ProductPlanPrice.tsx @@ -1,6 +1,6 @@ import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { pluralize } from '@sourcegraph/shared/src/util/strings' import { ProductPlanTiered } from './ProductPlanTiered' diff --git a/client/web/src/enterprise/dotcom/productPlans/ProductPlanTiered.tsx b/client/web/src/enterprise/dotcom/productPlans/ProductPlanTiered.tsx index ac6eb35d512..1f482fcdec3 100644 --- a/client/web/src/enterprise/dotcom/productPlans/ProductPlanTiered.tsx +++ b/client/web/src/enterprise/dotcom/productPlans/ProductPlanTiered.tsx @@ -1,6 +1,6 @@ import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' /** Displays the price of a tiered plan. */ export const ProductPlanTiered: React.FunctionComponent<{ diff --git a/client/web/src/enterprise/dotcom/productSubscriptions/AccountEmailAddresses.tsx b/client/web/src/enterprise/dotcom/productSubscriptions/AccountEmailAddresses.tsx index 2c15f7a92e2..b84d936188b 100644 --- a/client/web/src/enterprise/dotcom/productSubscriptions/AccountEmailAddresses.tsx +++ b/client/web/src/enterprise/dotcom/productSubscriptions/AccountEmailAddresses.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' /** * Displays an inline list of email addresses for an account. diff --git a/client/web/src/enterprise/dotcom/productSubscriptions/AccountName.tsx b/client/web/src/enterprise/dotcom/productSubscriptions/AccountName.tsx index 9929c42b79b..abefa29397c 100644 --- a/client/web/src/enterprise/dotcom/productSubscriptions/AccountName.tsx +++ b/client/web/src/enterprise/dotcom/productSubscriptions/AccountName.tsx @@ -1,7 +1,7 @@ import React from 'react' import { Link } from 'react-router-dom' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { userURL } from '../../../user' diff --git a/client/web/src/enterprise/dotcom/productSubscriptions/ProductLicenseValidity.tsx b/client/web/src/enterprise/dotcom/productSubscriptions/ProductLicenseValidity.tsx index 3471ecab317..d3e0b42d69d 100644 --- a/client/web/src/enterprise/dotcom/productSubscriptions/ProductLicenseValidity.tsx +++ b/client/web/src/enterprise/dotcom/productSubscriptions/ProductLicenseValidity.tsx @@ -3,7 +3,7 @@ import { parseISO } from 'date-fns' import format from 'date-fns/format' import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { formatRelativeExpirationDate, isProductLicenseExpired } from '../../../productSubscription/helpers' diff --git a/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx b/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx index 74b306c8179..a3bba75e0dd 100644 --- a/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx +++ b/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionLabel.tsx @@ -1,6 +1,6 @@ import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { formatUserCount } from '../../../productSubscription/helpers' diff --git a/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionNode.tsx b/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionNode.tsx index 555ba4d836e..12640a225fa 100644 --- a/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionNode.tsx +++ b/client/web/src/enterprise/dotcom/productSubscriptions/ProductSubscriptionNode.tsx @@ -1,8 +1,8 @@ import * as React from 'react' import { Link } from 'react-router-dom' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { ProductSubscriptionLabel } from './ProductSubscriptionLabel' diff --git a/client/web/src/enterprise/executors/useExecutors.tsx b/client/web/src/enterprise/executors/useExecutors.tsx index 77a950bf180..48f1b919e6e 100644 --- a/client/web/src/enterprise/executors/useExecutors.tsx +++ b/client/web/src/enterprise/executors/useExecutors.tsx @@ -2,8 +2,8 @@ import { ApolloClient } from '@apollo/client' import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { gql, getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, getDocumentNode } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { ExecutorFields, ExecutorsResult, ExecutorsVariables } from '../../graphql-operations' diff --git a/client/web/src/enterprise/extensions/extension/RegistryExtensionDeleteButton.tsx b/client/web/src/enterprise/extensions/extension/RegistryExtensionDeleteButton.tsx index 2e618277d1c..8c7ed66261b 100644 --- a/client/web/src/enterprise/extensions/extension/RegistryExtensionDeleteButton.tsx +++ b/client/web/src/enterprise/extensions/extension/RegistryExtensionDeleteButton.tsx @@ -6,7 +6,7 @@ import { Subject, Subscription } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { deleteRegistryExtensionWithConfirmation } from '../registry/backend' diff --git a/client/web/src/enterprise/extensions/extension/RegistryExtensionManagePage.tsx b/client/web/src/enterprise/extensions/extension/RegistryExtensionManagePage.tsx index 60c2dd69d35..d8919c4fae8 100644 --- a/client/web/src/enterprise/extensions/extension/RegistryExtensionManagePage.tsx +++ b/client/web/src/enterprise/extensions/extension/RegistryExtensionManagePage.tsx @@ -9,8 +9,8 @@ import { catchError, concatMap, map, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../../../auth' diff --git a/client/web/src/enterprise/extensions/extension/RegistryExtensionNewReleasePage.tsx b/client/web/src/enterprise/extensions/extension/RegistryExtensionNewReleasePage.tsx index b2a9a90e414..ab093bb8145 100644 --- a/client/web/src/enterprise/extensions/extension/RegistryExtensionNewReleasePage.tsx +++ b/client/web/src/enterprise/extensions/extension/RegistryExtensionNewReleasePage.tsx @@ -8,10 +8,10 @@ import { map, catchError, tap, concatMap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, isErrorLike } from '@sourcegraph/common' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { ConfiguredRegistryExtension } from '@sourcegraph/shared/src/extensions/extension' import { ExtensionManifest } from '@sourcegraph/shared/src/extensions/extensionManifest' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import extensionSchemaJSON from '@sourcegraph/shared/src/schema/extension.schema.json' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/enterprise/extensions/registry/RegistryExtensionSourceBadge.tsx b/client/web/src/enterprise/extensions/registry/RegistryExtensionSourceBadge.tsx index 8c874cc7043..53c65a8eff4 100644 --- a/client/web/src/enterprise/extensions/registry/RegistryExtensionSourceBadge.tsx +++ b/client/web/src/enterprise/extensions/registry/RegistryExtensionSourceBadge.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames' import * as React from 'react' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' export const RegistryExtensionSourceBadge: React.FunctionComponent<{ extension: Pick diff --git a/client/web/src/enterprise/extensions/registry/RegistryNewExtensionPage.tsx b/client/web/src/enterprise/extensions/registry/RegistryNewExtensionPage.tsx index 01750e8da22..96ab9d6c512 100644 --- a/client/web/src/enterprise/extensions/registry/RegistryNewExtensionPage.tsx +++ b/client/web/src/enterprise/extensions/registry/RegistryNewExtensionPage.tsx @@ -10,10 +10,10 @@ import { catchError, concatMap, map, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' -import { Button, LoadingSpinner } from '@sourcegraph/wildcard' +import * as GQL from '@sourcegraph/shared/src/schema' +import { LoadingSpinner, Button } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../../../auth' import { withAuthenticatedUser } from '../../../auth/withAuthenticatedUser' diff --git a/client/web/src/enterprise/extensions/registry/backend.ts b/client/web/src/enterprise/extensions/registry/backend.ts index a6c832a6df1..e2196e1a5d0 100644 --- a/client/web/src/enterprise/extensions/registry/backend.ts +++ b/client/web/src/enterprise/extensions/registry/backend.ts @@ -2,8 +2,8 @@ import { Observable, of } from 'rxjs' import { map, mapTo, switchMap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL, requestGraphQL } from '../../../backend/graphql' import { DeleteRegistryExtensionResult, DeleteRegistryExtensionVariables, Scalars } from '../../../graphql-operations' diff --git a/client/web/src/enterprise/insights/core/backend/core/api/get-repository-suggestions.ts b/client/web/src/enterprise/insights/core/backend/core/api/get-repository-suggestions.ts index 5034c296e7a..5b7983c9db4 100644 --- a/client/web/src/enterprise/insights/core/backend/core/api/get-repository-suggestions.ts +++ b/client/web/src/enterprise/insights/core/backend/core/api/get-repository-suggestions.ts @@ -1,6 +1,6 @@ import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { diff --git a/client/web/src/enterprise/insights/core/backend/core/api/get-resolved-search-repositories.ts b/client/web/src/enterprise/insights/core/backend/core/api/get-resolved-search-repositories.ts index a8f59e11db7..e761f13187b 100644 --- a/client/web/src/enterprise/insights/core/backend/core/api/get-resolved-search-repositories.ts +++ b/client/web/src/enterprise/insights/core/backend/core/api/get-resolved-search-repositories.ts @@ -1,6 +1,6 @@ import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { SearchRepositoriesResult } from '../../../../../../graphql-operations' diff --git a/client/web/src/enterprise/insights/core/backend/core/api/subject-settings.ts b/client/web/src/enterprise/insights/core/backend/core/api/subject-settings.ts index 658df9db919..e2b142aead0 100644 --- a/client/web/src/enterprise/insights/core/backend/core/api/subject-settings.ts +++ b/client/web/src/enterprise/insights/core/backend/core/api/subject-settings.ts @@ -1,7 +1,7 @@ import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' import { requestGraphQL } from '../../../../../../backend/graphql' diff --git a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-lang-stats-insight.ts b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-lang-stats-insight.ts index 7fc793734ea..d92120d2bf6 100644 --- a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-lang-stats-insight.ts +++ b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-lang-stats-insight.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { LangStatsInsightContentResult, LangStatsInsightContentVariables } from '../../../../../../graphql-operations' diff --git a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-repositories.ts b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-repositories.ts index 3ce3e9733ad..8188e944c51 100644 --- a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-repositories.ts +++ b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-repositories.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { BulkSearchRepositories } from '../../../../../../graphql-operations' diff --git a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-search-insight.ts b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-search-insight.ts index b729b832ebf..3de4459c6b6 100644 --- a/client/web/src/enterprise/insights/core/backend/core/requests/fetch-search-insight.ts +++ b/client/web/src/enterprise/insights/core/backend/core/requests/fetch-search-insight.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { BulkSearchCommits, BulkSearchFields } from '../../../../../../graphql-operations' diff --git a/client/web/src/enterprise/insights/core/backend/gql-api/code-insights-gql-backend.ts b/client/web/src/enterprise/insights/core/backend/gql-api/code-insights-gql-backend.ts index 1a3f16ff247..25a832bc3e8 100644 --- a/client/web/src/enterprise/insights/core/backend/gql-api/code-insights-gql-backend.ts +++ b/client/web/src/enterprise/insights/core/backend/gql-api/code-insights-gql-backend.ts @@ -16,8 +16,8 @@ import { UpdateInsightsDashboardInput, } from 'src/graphql-operations' +import { fromObservableQuery } from '@sourcegraph/http-client' import { ViewContexts } from '@sourcegraph/shared/src/api/extension/extensionHostApi' -import { fromObservableQuery } from '@sourcegraph/shared/src/graphql/apollo' import { BackendInsight, Insight, InsightDashboard, InsightsDashboardScope, InsightsDashboardType } from '../../types' import { ALL_INSIGHTS_DASHBOARD_ID } from '../../types/dashboard/virtual-dashboard' diff --git a/client/web/src/enterprise/insights/core/backend/setting-based-api/gql-handlers/get-backend-insight.ts b/client/web/src/enterprise/insights/core/backend/setting-based-api/gql-handlers/get-backend-insight.ts index 239fd9d7f0b..b340bb8fd80 100644 --- a/client/web/src/enterprise/insights/core/backend/setting-based-api/gql-handlers/get-backend-insight.ts +++ b/client/web/src/enterprise/insights/core/backend/setting-based-api/gql-handlers/get-backend-insight.ts @@ -2,7 +2,7 @@ import { uniqBy } from 'lodash' import { Observable, of, throwError } from 'rxjs' import { map, switchMap } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../../../../backend/graphql' import { InsightFields, InsightsResult } from '../../../../../../graphql-operations' diff --git a/client/web/src/enterprise/organizations/EarlyAccessOrgsCodeForm.tsx b/client/web/src/enterprise/organizations/EarlyAccessOrgsCodeForm.tsx index e89830891c2..25297dd0432 100644 --- a/client/web/src/enterprise/organizations/EarlyAccessOrgsCodeForm.tsx +++ b/client/web/src/enterprise/organizations/EarlyAccessOrgsCodeForm.tsx @@ -1,8 +1,8 @@ import React, { FunctionComponent, useCallback, useState } from 'react' import { Form } from '@sourcegraph/branded/src/components/Form' -import { gql, useLazyQuery, useMutation } from '@sourcegraph/shared/src/graphql/graphql' -import { IFeatureFlagOverride } from '@sourcegraph/shared/src/graphql/schema' +import { gql, useLazyQuery, useMutation } from '@sourcegraph/http-client' +import { IFeatureFlagOverride } from '@sourcegraph/shared/src/schema' import { Input } from '@sourcegraph/wildcard' import { LoaderButton } from '../../components/LoaderButton' diff --git a/client/web/src/enterprise/productSubscription/ProductLicenseInfoDescription.tsx b/client/web/src/enterprise/productSubscription/ProductLicenseInfoDescription.tsx index dbd42ea571b..6f8c3aff61c 100644 --- a/client/web/src/enterprise/productSubscription/ProductLicenseInfoDescription.tsx +++ b/client/web/src/enterprise/productSubscription/ProductLicenseInfoDescription.tsx @@ -1,6 +1,6 @@ import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { formatUserCount } from '../../productSubscription/helpers' diff --git a/client/web/src/enterprise/productSubscription/TrueUpStatusSummary.tsx b/client/web/src/enterprise/productSubscription/TrueUpStatusSummary.tsx index 8450977b928..b442724f84e 100644 --- a/client/web/src/enterprise/productSubscription/TrueUpStatusSummary.tsx +++ b/client/web/src/enterprise/productSubscription/TrueUpStatusSummary.tsx @@ -1,6 +1,6 @@ import * as React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { numberWithCommas } from '@sourcegraph/shared/src/util/strings' import { SingleValueCard } from '../../components/SingleValueCard' diff --git a/client/web/src/enterprise/repo/settings/backend.ts b/client/web/src/enterprise/repo/settings/backend.ts index 57100dbb77c..42600af7dd3 100644 --- a/client/web/src/enterprise/repo/settings/backend.ts +++ b/client/web/src/enterprise/repo/settings/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { requestGraphQL } from '../../../backend/graphql' import { diff --git a/client/web/src/enterprise/search/stats/SearchStatsLanguages.tsx b/client/web/src/enterprise/search/stats/SearchStatsLanguages.tsx index 313a09dab0a..5bcc33136cf 100644 --- a/client/web/src/enterprise/search/stats/SearchStatsLanguages.tsx +++ b/client/web/src/enterprise/search/stats/SearchStatsLanguages.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react' import { Link } from 'react-router-dom' import { PieChart, Pie, Tooltip, ResponsiveContainer, PieLabelRenderProps, Cell, TooltipFormatter } from 'recharts' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { numberWithCommas, pluralize } from '@sourcegraph/shared/src/util/strings' import { buildSearchURLQuery } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/enterprise/search/stats/SearchStatsPage.test.tsx b/client/web/src/enterprise/search/stats/SearchStatsPage.test.tsx index e9bf6b10d73..735dd6fdab8 100644 --- a/client/web/src/enterprise/search/stats/SearchStatsPage.test.tsx +++ b/client/web/src/enterprise/search/stats/SearchStatsPage.test.tsx @@ -4,7 +4,7 @@ import React from 'react' import { MemoryRouter } from 'react-router' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SearchStatsPage } from './SearchStatsPage' diff --git a/client/web/src/enterprise/search/stats/backend.ts b/client/web/src/enterprise/search/stats/backend.ts index b867afc6e07..1486ec89de2 100644 --- a/client/web/src/enterprise/search/stats/backend.ts +++ b/client/web/src/enterprise/search/stats/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/searchContexts/CreateSearchContextPage.tsx b/client/web/src/enterprise/searchContexts/CreateSearchContextPage.tsx index b20c9a39c10..1dc4dcdfee0 100644 --- a/client/web/src/enterprise/searchContexts/CreateSearchContextPage.tsx +++ b/client/web/src/enterprise/searchContexts/CreateSearchContextPage.tsx @@ -8,7 +8,7 @@ import { SearchContextInput, SearchContextRepositoryRevisionsInput, } from '@sourcegraph/shared/src/graphql-operations' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { Page } from '@sourcegraph/web/src/components/Page' diff --git a/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.story.tsx b/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.story.tsx index c94cac16e8e..ad9d9e5d3da 100644 --- a/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.story.tsx +++ b/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.story.tsx @@ -3,7 +3,7 @@ import React from 'react' import { NEVER } from 'rxjs' import sinon from 'sinon' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.tsx b/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.tsx index a154a0b5608..18ef6fcc9dd 100644 --- a/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.tsx +++ b/client/web/src/enterprise/searchContexts/DeleteSearchContextModal.tsx @@ -5,7 +5,7 @@ import { Observable } from 'rxjs' import { mergeMap, startWith, tap, catchError } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { ALLOW_NAVIGATION } from '@sourcegraph/web/src/components/AwayPrompt' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/searchContexts/EditSearchContextPage.tsx b/client/web/src/enterprise/searchContexts/EditSearchContextPage.tsx index 456ce32c34b..8eeb13bf6d8 100644 --- a/client/web/src/enterprise/searchContexts/EditSearchContextPage.tsx +++ b/client/web/src/enterprise/searchContexts/EditSearchContextPage.tsx @@ -10,7 +10,7 @@ import { SearchContextEditInput, SearchContextRepositoryRevisionsInput, } from '@sourcegraph/shared/src/graphql-operations' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/enterprise/searchContexts/SearchContextForm.story.tsx b/client/web/src/enterprise/searchContexts/SearchContextForm.story.tsx index af00c747cc8..3de7f7615f9 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextForm.story.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextForm.story.tsx @@ -4,7 +4,7 @@ import React from 'react' import { NEVER, Observable, of } from 'rxjs' import sinon from 'sinon' -import { IOrg, IRepository, ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { IOrg, IRepository, ISearchContext } from '@sourcegraph/shared/src/schema' import { AuthenticatedUser } from '../../auth' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/enterprise/searchContexts/SearchContextForm.tsx b/client/web/src/enterprise/searchContexts/SearchContextForm.tsx index 3ab53d1f51b..d94ad0977a9 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextForm.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextForm.tsx @@ -12,7 +12,7 @@ import { SearchContextRepositoryRevisionsInput, SearchPatternType, } from '@sourcegraph/shared/src/graphql-operations' -import { ISearchContext, ISearchContextRepositoryRevisionsInput } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext, ISearchContextRepositoryRevisionsInput } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/enterprise/searchContexts/SearchContextOwnerDropdown.tsx b/client/web/src/enterprise/searchContexts/SearchContextOwnerDropdown.tsx index d45f5de5847..ec25c52c2d7 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextOwnerDropdown.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextOwnerDropdown.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames' import React, { useCallback, useState, useMemo } from 'react' import { Dropdown, DropdownItem, DropdownMenu, DropdownToggle } from 'reactstrap' -import { Namespace } from '@sourcegraph/shared/src/graphql/schema' +import { Namespace } from '@sourcegraph/shared/src/schema' import { AuthenticatedUser } from '../../auth' diff --git a/client/web/src/enterprise/searchContexts/SearchContextPage.story.tsx b/client/web/src/enterprise/searchContexts/SearchContextPage.story.tsx index 225c1c2291a..8bba3445039 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextPage.story.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextPage.story.tsx @@ -3,7 +3,7 @@ import { subDays } from 'date-fns' import React from 'react' import { NEVER, Observable, of, throwError } from 'rxjs' -import { IRepository, ISearchContext, ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/graphql/schema' +import { IRepository, ISearchContext, ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/schema' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/enterprise/searchContexts/SearchContextPage.tsx b/client/web/src/enterprise/searchContexts/SearchContextPage.tsx index a10e5cdfc44..0f813c80f2d 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextPage.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextPage.tsx @@ -10,7 +10,7 @@ import { Link } from '@sourcegraph/shared/src/components/Link' import { Markdown } from '@sourcegraph/shared/src/components/Markdown' import { VirtualList } from '@sourcegraph/shared/src/components/VirtualList' import { Scalars, SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import { ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/schema' import { renderMarkdown } from '@sourcegraph/shared/src/util/markdown' import { pluralize } from '@sourcegraph/shared/src/util/strings' import { buildSearchURLQuery } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/enterprise/searchContexts/SearchContextRepositoriesFormArea.tsx b/client/web/src/enterprise/searchContexts/SearchContextRepositoriesFormArea.tsx index 18edc501495..d1d67d8cdeb 100644 --- a/client/web/src/enterprise/searchContexts/SearchContextRepositoriesFormArea.tsx +++ b/client/web/src/enterprise/searchContexts/SearchContextRepositoriesFormArea.tsx @@ -6,7 +6,7 @@ import { useHistory } from 'react-router' import { Observable } from 'rxjs' import { delay, mergeMap, startWith, tap } from 'rxjs/operators' -import { ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContextRepositoryRevisions } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/enterprise/searchContexts/backend.ts b/client/web/src/enterprise/searchContexts/backend.ts index d926e4ea7a0..317180fd65e 100644 --- a/client/web/src/enterprise/searchContexts/backend.ts +++ b/client/web/src/enterprise/searchContexts/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../backend/graphql' import { RepositoriesByNamesResult, RepositoriesByNamesVariables } from '../../graphql-operations' diff --git a/client/web/src/enterprise/site-admin/SiteAdminAuthenticationProvidersPage.tsx b/client/web/src/enterprise/site-admin/SiteAdminAuthenticationProvidersPage.tsx index d9875778e96..2bc96688394 100644 --- a/client/web/src/enterprise/site-admin/SiteAdminAuthenticationProvidersPage.tsx +++ b/client/web/src/enterprise/site-admin/SiteAdminAuthenticationProvidersPage.tsx @@ -4,9 +4,9 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' -import { Badge, Button } from '@sourcegraph/wildcard' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' +import { Button, Badge } from '@sourcegraph/wildcard' import { queryGraphQL } from '../../backend/graphql' import { FilteredConnection } from '../../components/FilteredConnection' diff --git a/client/web/src/enterprise/site-admin/SiteAdminExternalAccountsPage.tsx b/client/web/src/enterprise/site-admin/SiteAdminExternalAccountsPage.tsx index 569181a22d3..4737b129409 100644 --- a/client/web/src/enterprise/site-admin/SiteAdminExternalAccountsPage.tsx +++ b/client/web/src/enterprise/site-admin/SiteAdminExternalAccountsPage.tsx @@ -5,8 +5,8 @@ import { Observable, Subject, Subscription } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { Button } from '@sourcegraph/wildcard' import { requestGraphQL } from '../../backend/graphql' diff --git a/client/web/src/enterprise/site-admin/SiteAdminRegistryExtensionsPage.tsx b/client/web/src/enterprise/site-admin/SiteAdminRegistryExtensionsPage.tsx index 678441dc74f..fbe8136d8dc 100644 --- a/client/web/src/enterprise/site-admin/SiteAdminRegistryExtensionsPage.tsx +++ b/client/web/src/enterprise/site-admin/SiteAdminRegistryExtensionsPage.tsx @@ -7,8 +7,8 @@ import { Observable, Subject, Subscription } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { queryGraphQL } from '../../backend/graphql' diff --git a/client/web/src/enterprise/site-admin/backend.ts b/client/web/src/enterprise/site-admin/backend.ts index c0e797f693a..b950375e271 100644 --- a/client/web/src/enterprise/site-admin/backend.ts +++ b/client/web/src/enterprise/site-admin/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL } from '../../backend/graphql' diff --git a/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomerBillingLink.tsx b/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomerBillingLink.tsx index 2f0a1a8a880..589811fb41a 100644 --- a/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomerBillingLink.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomerBillingLink.tsx @@ -5,8 +5,8 @@ import { Observable } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomersPage.tsx b/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomersPage.tsx index 54126cb5312..9f37a2a3b50 100644 --- a/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomersPage.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/customers/SiteAdminCustomersPage.tsx @@ -4,8 +4,8 @@ import { Observable, Subject } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL } from '../../../../backend/graphql' import { FilteredConnection } from '../../../../components/FilteredConnection' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx index 88c6b790c0b..5d3c1f62f7c 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminCreateProductSubscriptionPage.tsx @@ -8,8 +8,8 @@ import { catchError, concatMapTo, map, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.tsx index 058a6aa69fb..11a9b4b59a6 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminGenerateProductLicenseForSubscriptionForm.tsx @@ -6,9 +6,9 @@ import { catchError, map, startWith, switchMap, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.test.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.test.tsx index dc13f27a76d..f0ac2c38cbe 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.test.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.test.tsx @@ -2,7 +2,7 @@ import { render } from '@testing-library/react' import React from 'react' import { MemoryRouter } from 'react-router' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SiteAdminProductLicenseNode } from './SiteAdminProductLicenseNode' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.tsx index 89a3ed2ca86..b5b21b5b19e 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicenseNode.tsx @@ -1,8 +1,8 @@ import * as React from 'react' +import { gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { CopyableText } from '../../../../components/CopyableText' import { Timestamp } from '../../../../components/time/Timestamp' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicensesPage.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicensesPage.tsx index 718907ded20..2050a3064f2 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicensesPage.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductLicensesPage.tsx @@ -4,8 +4,8 @@ import { Observable, of } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL } from '../../../../backend/graphql' import { FilteredConnection } from '../../../../components/FilteredConnection' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionBillingLink.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionBillingLink.tsx index efd52dbf1fd..af5460a18f6 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionBillingLink.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionBillingLink.tsx @@ -5,8 +5,8 @@ import { Observable } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionNode.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionNode.tsx index 90c10eb5ba9..322eecdbd1f 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionNode.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionNode.tsx @@ -1,8 +1,8 @@ import * as React from 'react' +import { gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Timestamp } from '../../../../components/time/Timestamp' import { AccountName } from '../../../dotcom/productSubscriptions/AccountName' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.test.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.test.tsx index b4bed3a1460..5e140a4202b 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.test.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.test.tsx @@ -4,7 +4,7 @@ import React from 'react' import { MemoryRouter } from 'react-router' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SiteAdminProductSubscriptionPage } from './SiteAdminProductSubscriptionPage' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.tsx index 583fb65f2b6..c4561adcdc7 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionPage.tsx @@ -8,8 +8,8 @@ import { Observable, Subject, NEVER } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap, filter } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useEventObservable, useObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionsPage.tsx b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionsPage.tsx index 14011307e4c..cc3fbc856af 100644 --- a/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionsPage.tsx +++ b/client/web/src/enterprise/site-admin/dotcom/productSubscriptions/SiteAdminProductSubscriptionsPage.tsx @@ -5,8 +5,8 @@ import { Link } from 'react-router-dom' import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { queryGraphQL } from '../../../../backend/graphql' diff --git a/client/web/src/enterprise/site-admin/productSubscription/ProductSubscriptionStatus.tsx b/client/web/src/enterprise/site-admin/productSubscription/ProductSubscriptionStatus.tsx index a9c26ddca3b..3e229af62f5 100644 --- a/client/web/src/enterprise/site-admin/productSubscription/ProductSubscriptionStatus.tsx +++ b/client/web/src/enterprise/site-admin/productSubscription/ProductSubscriptionStatus.tsx @@ -5,8 +5,8 @@ import { Observable } from 'rxjs' import { catchError, map } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { numberWithCommas } from '@sourcegraph/shared/src/util/strings' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/productSubscriptions/BackToAllSubscriptionsLink.tsx b/client/web/src/enterprise/user/productSubscriptions/BackToAllSubscriptionsLink.tsx index ab81cf51705..648f4640fef 100644 --- a/client/web/src/enterprise/user/productSubscriptions/BackToAllSubscriptionsLink.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/BackToAllSubscriptionsLink.tsx @@ -2,7 +2,7 @@ import ArrowLeftIcon from 'mdi-react/ArrowLeftIcon' import React from 'react' import { Link } from 'react-router-dom' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' export const BackToAllSubscriptionsLink: React.FunctionComponent<{ user: Pick }> = ({ diff --git a/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.test.tsx b/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.test.tsx index bc7dd99345a..6a32a52d75b 100644 --- a/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.test.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.test.tsx @@ -2,7 +2,7 @@ import { render, act } from '@testing-library/react' import React from 'react' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { NewProductSubscriptionPaymentSection } from './NewProductSubscriptionPaymentSection' diff --git a/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.tsx b/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.tsx index 9bd6099287e..05dea98e08e 100644 --- a/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/NewProductSubscriptionPaymentSection.tsx @@ -7,9 +7,9 @@ import { Observable, of } from 'rxjs' import { catchError, map, startWith } from 'rxjs/operators' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { numberWithCommas } from '@sourcegraph/shared/src/util/strings' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBeforeAfterInvoiceItem.tsx b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBeforeAfterInvoiceItem.tsx index be7ded3da89..96bf2c3df6d 100644 --- a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBeforeAfterInvoiceItem.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBeforeAfterInvoiceItem.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames' import { parseISO } from 'date-fns' import React from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { numberWithCommas } from '@sourcegraph/shared/src/util/strings' import { ExpirationDate } from '../../productSubscription/ExpirationDate' diff --git a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBilling.tsx b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBilling.tsx index ef1125a2abc..758b778485a 100644 --- a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBilling.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionBilling.tsx @@ -1,7 +1,7 @@ import React from 'react' import { Link } from 'react-router-dom' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { ProductSubscriptionLabel } from '../../dotcom/productSubscriptions/ProductSubscriptionLabel' diff --git a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionForm.tsx b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionForm.tsx index f2d97f354e0..34be860e3d9 100644 --- a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionForm.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionForm.tsx @@ -9,7 +9,7 @@ import { catchError, startWith, switchMap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionHistory.tsx b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionHistory.tsx index 733f3ad06ac..e3eeb721543 100644 --- a/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionHistory.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/ProductSubscriptionHistory.tsx @@ -4,7 +4,7 @@ import ExternalLinkIcon from 'mdi-react/ExternalLinkIcon' import React from 'react' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' export const ProductSubscriptionHistory: React.FunctionComponent<{ productSubscription: Pick diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.test.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.test.tsx index be8d17f0ad2..1dbb93f55b3 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.test.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.test.tsx @@ -4,7 +4,7 @@ import React from 'react' import { MemoryRouter } from 'react-router' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { UserSubscriptionsEditProductSubscriptionPage } from './UserSubscriptionsEditProductSubscriptionPage' diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.tsx index 5d0bc3c6a09..647b2089377 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsEditProductSubscriptionPage.tsx @@ -7,8 +7,8 @@ import { Observable, throwError } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useEventObservable, useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsNewProductSubscriptionPage.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsNewProductSubscriptionPage.tsx index c68f2a9b731..85e98838e76 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsNewProductSubscriptionPage.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsNewProductSubscriptionPage.tsx @@ -7,8 +7,8 @@ import { Observable } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useEventObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.test.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.test.tsx index ea10b1a8074..5069c1f57ee 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.test.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.test.tsx @@ -4,7 +4,7 @@ import React from 'react' import { MemoryRouter } from 'react-router' import { of } from 'rxjs' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { UserSubscriptionsProductSubscriptionPage } from './UserSubscriptionsProductSubscriptionPage' diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.tsx index de0e751c9fa..ba91a07e83d 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionPage.tsx @@ -7,8 +7,8 @@ import { Observable } from 'rxjs' import { catchError, map, startWith } from 'rxjs/operators' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionsPage.tsx b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionsPage.tsx index 26775ae0e96..b8a69a17c94 100644 --- a/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionsPage.tsx +++ b/client/web/src/enterprise/user/productSubscriptions/UserSubscriptionsProductSubscriptionsPage.tsx @@ -5,8 +5,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Container, PageHeader, Button } from '@sourcegraph/wildcard' import { queryGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/user/settings/ExternalAccountNode.tsx b/client/web/src/enterprise/user/settings/ExternalAccountNode.tsx index 0e22207711e..ee4d1a4a772 100644 --- a/client/web/src/enterprise/user/settings/ExternalAccountNode.tsx +++ b/client/web/src/enterprise/user/settings/ExternalAccountNode.tsx @@ -4,7 +4,7 @@ import { Observable, Subject, Subscription } from 'rxjs' import { catchError, filter, map, mapTo, startWith, switchMap, tap } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { Badge, Button } from '@sourcegraph/wildcard' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/enterprise/user/settings/UserEventLogsPage.tsx b/client/web/src/enterprise/user/settings/UserEventLogsPage.tsx index 64102451d71..d5c37d7fe38 100644 --- a/client/web/src/enterprise/user/settings/UserEventLogsPage.tsx +++ b/client/web/src/enterprise/user/settings/UserEventLogsPage.tsx @@ -4,8 +4,8 @@ import { RouteComponentProps } from 'react-router' import { Observable } from 'rxjs' import { map } from 'rxjs/operators' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Container, PageHeader } from '@sourcegraph/wildcard' diff --git a/client/web/src/enterprise/user/settings/UserSettingsExternalAccountsPage.tsx b/client/web/src/enterprise/user/settings/UserSettingsExternalAccountsPage.tsx index 6f2c0f48870..f0ca6ae5f6a 100644 --- a/client/web/src/enterprise/user/settings/UserSettingsExternalAccountsPage.tsx +++ b/client/web/src/enterprise/user/settings/UserSettingsExternalAccountsPage.tsx @@ -4,7 +4,7 @@ import { Observable, Subject, Subscription } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { FilteredConnection } from '../../../components/FilteredConnection' diff --git a/client/web/src/enterprise/user/settings/auth/backend.ts b/client/web/src/enterprise/user/settings/auth/backend.ts index 6c83e83c8f6..36e5d91ec5c 100644 --- a/client/web/src/enterprise/user/settings/auth/backend.ts +++ b/client/web/src/enterprise/user/settings/auth/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { mapTo, map, tap } from 'rxjs/operators' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { resetAllMemoizationCaches } from '@sourcegraph/shared/src/util/memoizeObservable' import { requestGraphQL } from '../../../../backend/graphql' diff --git a/client/web/src/extensions/ExtensionCard.tsx b/client/web/src/extensions/ExtensionCard.tsx index 9a2eb0bf18a..8f3e27c7fae 100644 --- a/client/web/src/extensions/ExtensionCard.tsx +++ b/client/web/src/extensions/ExtensionCard.tsx @@ -5,8 +5,8 @@ import { Link } from 'react-router-dom' import { isErrorLike } from '@sourcegraph/common' import { ConfiguredRegistryExtension, splitExtensionID } from '@sourcegraph/shared/src/extensions/extension' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { ExtensionHeaderColor, ExtensionManifest, diff --git a/client/web/src/extensions/ExtensionRegistry.tsx b/client/web/src/extensions/ExtensionRegistry.tsx index e37e20a16a6..7a228ba6af6 100644 --- a/client/web/src/extensions/ExtensionRegistry.tsx +++ b/client/web/src/extensions/ExtensionRegistry.tsx @@ -5,8 +5,8 @@ import { debounce, delay, map, switchMap, takeUntil, tap, distinctUntilChanged } import { Form } from '@sourcegraph/branded/src/components/Form' import { createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { ConfiguredRegistryExtension, isExtensionEnabled } from '@sourcegraph/shared/src/extensions/extension' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { ExtensionCategory, EXTENSION_CATEGORIES } from '@sourcegraph/shared/src/schema/extensionSchema' import { Settings, SettingsCascadeProps, SettingsCascadeOrError } from '@sourcegraph/shared/src/settings/settings' diff --git a/client/web/src/extensions/ExtensionsArea.tsx b/client/web/src/extensions/ExtensionsArea.tsx index e46bdc5510c..10d1eabde7b 100644 --- a/client/web/src/extensions/ExtensionsArea.tsx +++ b/client/web/src/extensions/ExtensionsArea.tsx @@ -2,8 +2,8 @@ import MapSearchIcon from 'mdi-react/MapSearchIcon' import * as React from 'react' import { Route, RouteComponentProps, Switch } from 'react-router' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/extensions/extension/ExtensionArea.tsx b/client/web/src/extensions/extension/ExtensionArea.tsx index 39e39d1b13c..ff3dfa2cba0 100644 --- a/client/web/src/extensions/extension/ExtensionArea.tsx +++ b/client/web/src/extensions/extension/ExtensionArea.tsx @@ -6,14 +6,14 @@ import { combineLatest, merge, Observable, of, Subject, Subscription } from 'rxj import { catchError, distinctUntilChanged, map, mapTo, startWith, switchMap } from 'rxjs/operators' import { createAggregateError, ErrorLike, isErrorLike, asError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { ConfiguredRegistryExtension, splitExtensionID, toConfiguredRegistryExtension, } from '@sourcegraph/shared/src/extensions/extension' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/extensions/extension/extension.ts b/client/web/src/extensions/extension/extension.ts index cde3f08f70c..e132ae48a01 100644 --- a/client/web/src/extensions/extension/extension.ts +++ b/client/web/src/extensions/extension/extension.ts @@ -1,7 +1,7 @@ import { uniq } from 'lodash' import { ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { EXTENSION_CATEGORIES, ExtensionCategory, diff --git a/client/web/src/featureFlags/featureFlags.ts b/client/web/src/featureFlags/featureFlags.ts index ae2d2d898ee..2748bf7f1db 100644 --- a/client/web/src/featureFlags/featureFlags.ts +++ b/client/web/src/featureFlags/featureFlags.ts @@ -1,7 +1,7 @@ import { from, Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../backend/graphql' import { FetchFeatureFlagsResult } from '../graphql-operations' diff --git a/client/web/src/global/GlobalAlert.tsx b/client/web/src/global/GlobalAlert.tsx index cd85798e3a7..60a84fac9f4 100644 --- a/client/web/src/global/GlobalAlert.tsx +++ b/client/web/src/global/GlobalAlert.tsx @@ -2,7 +2,7 @@ import React from 'react' import { Markdown } from '@sourcegraph/shared/src/components/Markdown' import { AlertType } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { renderMarkdown } from '@sourcegraph/shared/src/util/markdown' import { DismissibleAlert } from '../components/DismissibleAlert' diff --git a/client/web/src/integration/repository.test.ts b/client/web/src/integration/repository.test.ts index 7a4a67db5a0..954c4ffd366 100644 --- a/client/web/src/integration/repository.test.ts +++ b/client/web/src/integration/repository.test.ts @@ -5,7 +5,7 @@ import type * as sourcegraph from 'sourcegraph' import { ExtensionManifest } from '@sourcegraph/shared/src/extensions/extensionManifest' import { SharedGraphQlOperations } from '@sourcegraph/shared/src/graphql-operations' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { Settings } from '@sourcegraph/shared/src/settings/settings' import { createDriverForTest, Driver } from '@sourcegraph/shared/src/testing/driver' import { afterEachSaveScreenshotIfFailed } from '@sourcegraph/shared/src/testing/screenshotReporter' diff --git a/client/web/src/integration/search-contexts.test.ts b/client/web/src/integration/search-contexts.test.ts index 6e126d45bc9..1435c920df9 100644 --- a/client/web/src/integration/search-contexts.test.ts +++ b/client/web/src/integration/search-contexts.test.ts @@ -4,7 +4,7 @@ import { range } from 'lodash' import { test } from 'mocha' import { SharedGraphQlOperations } from '@sourcegraph/shared/src/graphql-operations' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { Driver, createDriverForTest } from '@sourcegraph/shared/src/testing/driver' import { afterEachSaveScreenshotIfFailed } from '@sourcegraph/shared/src/testing/screenshotReporter' diff --git a/client/web/src/marketing/SurveyForm.tsx b/client/web/src/marketing/SurveyForm.tsx index 35686ff8821..b5e098ffea2 100644 --- a/client/web/src/marketing/SurveyForm.tsx +++ b/client/web/src/marketing/SurveyForm.tsx @@ -2,8 +2,7 @@ import React, { useState } from 'react' import { useHistory } from 'react-router' import { Form } from '@sourcegraph/branded/src/components/Form' -import { useMutation } from '@sourcegraph/shared/src/graphql/apollo' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { useMutation, gql } from '@sourcegraph/http-client' import { Button, LoadingSpinner, TextArea } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/marketing/SurveyPage.mocks.ts b/client/web/src/marketing/SurveyPage.mocks.ts index b87929a5bef..6f6a5092c86 100644 --- a/client/web/src/marketing/SurveyPage.mocks.ts +++ b/client/web/src/marketing/SurveyPage.mocks.ts @@ -1,6 +1,6 @@ import { MockedResponse } from '@apollo/client/testing' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/apollo' +import { getDocumentNode } from '@sourcegraph/http-client' import { SubmitSurveyResult, SubmitSurveyVariables } from '../graphql-operations' diff --git a/client/web/src/marketing/backend.ts b/client/web/src/marketing/backend.ts index 0ac70310bc8..f0f238adea6 100644 --- a/client/web/src/marketing/backend.ts +++ b/client/web/src/marketing/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map, mapTo } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../backend/graphql' import { diff --git a/client/web/src/namespaces/NamespaceArea.tsx b/client/web/src/namespaces/NamespaceArea.tsx index cd6efabc5d5..0690782e399 100644 --- a/client/web/src/namespaces/NamespaceArea.tsx +++ b/client/web/src/namespaces/NamespaceArea.tsx @@ -1,5 +1,5 @@ import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/namespaces/index.ts b/client/web/src/namespaces/index.ts index 1227f7ec7ed..88b2d6b8129 100644 --- a/client/web/src/namespaces/index.ts +++ b/client/web/src/namespaces/index.ts @@ -1,4 +1,4 @@ -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' /** * Common props for components underneath a namespace (e.g., a user or organization). diff --git a/client/web/src/nav/Feedback/FeedbackPrompt.story.tsx b/client/web/src/nav/Feedback/FeedbackPrompt.story.tsx index 5dbc334e1ca..7e91cbd5600 100644 --- a/client/web/src/nav/Feedback/FeedbackPrompt.story.tsx +++ b/client/web/src/nav/Feedback/FeedbackPrompt.story.tsx @@ -3,7 +3,7 @@ import { Meta } from '@storybook/react' import React from 'react' import { BrandedStory } from '@sourcegraph/branded/src/components/BrandedStory' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import webStyles from '@sourcegraph/web/src/SourcegraphWebApp.scss' import { FeedbackPrompt, SUBMIT_HAPPINESS_FEEDBACK_QUERY } from '.' diff --git a/client/web/src/nav/Feedback/FeedbackPrompt.test.tsx b/client/web/src/nav/Feedback/FeedbackPrompt.test.tsx index c828ee6c5ac..96643fc015e 100644 --- a/client/web/src/nav/Feedback/FeedbackPrompt.test.tsx +++ b/client/web/src/nav/Feedback/FeedbackPrompt.test.tsx @@ -3,7 +3,7 @@ import { render, RenderResult, fireEvent } from '@testing-library/react' import { GraphQLError } from 'graphql' import React from 'react' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { MockedTestProvider, waitForNextApolloResponse } from '@sourcegraph/shared/src/testing/apollo' import { SubmitHappinessFeedbackResult, SubmitHappinessFeedbackVariables } from '../../graphql-operations' diff --git a/client/web/src/nav/Feedback/FeedbackPrompt.tsx b/client/web/src/nav/Feedback/FeedbackPrompt.tsx index b641496eb48..b0972ae3865 100644 --- a/client/web/src/nav/Feedback/FeedbackPrompt.tsx +++ b/client/web/src/nav/Feedback/FeedbackPrompt.tsx @@ -5,8 +5,8 @@ import React, { useCallback, useEffect, useRef, useState } from 'react' import { ButtonDropdown, DropdownMenu, DropdownToggle } from 'reactstrap' import { Form } from '@sourcegraph/branded/src/components/Form' +import { gql, useMutation } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' -import { gql, useMutation } from '@sourcegraph/shared/src/graphql/graphql' import { useLocalStorage } from '@sourcegraph/shared/src/util/useLocalStorage' import { Button, FlexTextArea, LoadingSpinner, useAutoFocus } from '@sourcegraph/wildcard' diff --git a/client/web/src/nav/StatusMessagesNavItem.tsx b/client/web/src/nav/StatusMessagesNavItem.tsx index 1a057e3745e..b28fd305683 100644 --- a/client/web/src/nav/StatusMessagesNavItem.tsx +++ b/client/web/src/nav/StatusMessagesNavItem.tsx @@ -12,6 +12,7 @@ import { Observable, Subscription, of } from 'rxjs' import { catchError, map, repeatWhen, delay, distinctUntilChanged, switchMap } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { CloudAlertIconRefresh, CloudSyncIconRefresh, @@ -19,7 +20,6 @@ import { } from '@sourcegraph/shared/src/components/icons' import { Link } from '../../../shared/src/components/Link' -import { dataOrThrowErrors, gql } from '../../../shared/src/graphql/graphql' import { repeatUntil } from '../../../shared/src/util/rxjs/repeatUntil' import { requestGraphQL } from '../backend/graphql' import { ErrorAlert } from '../components/alerts' diff --git a/client/web/src/org/area/OrgArea.tsx b/client/web/src/org/area/OrgArea.tsx index 538e770e9fa..83fc0b766c1 100644 --- a/client/web/src/org/area/OrgArea.tsx +++ b/client/web/src/org/area/OrgArea.tsx @@ -6,8 +6,8 @@ import { combineLatest, merge, Observable, of, Subject, Subscription } from 'rxj import { catchError, distinctUntilChanged, map, mapTo, startWith, switchMap } from 'rxjs/operators' import { ErrorLike, isErrorLike, asError } from '@sourcegraph/common' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/org/area/OrgInvitationPage.tsx b/client/web/src/org/area/OrgInvitationPage.tsx index 1c796e976e3..192816eb17d 100644 --- a/client/web/src/org/area/OrgInvitationPage.tsx +++ b/client/web/src/org/area/OrgInvitationPage.tsx @@ -5,10 +5,10 @@ import { catchError, concatMap, distinctUntilKeyChanged, map, mapTo, tap, withLa import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { OrganizationInvitationResponseType } from '@sourcegraph/shared/src/graphql-operations' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' -import { Button, LoadingSpinner } from '@sourcegraph/wildcard' +import * as GQL from '@sourcegraph/shared/src/schema' +import { LoadingSpinner, Button } from '@sourcegraph/wildcard' import { orgURL } from '..' import { refreshAuthenticatedUser, AuthenticatedUser } from '../../auth' diff --git a/client/web/src/org/backend.ts b/client/web/src/org/backend.ts index f5e8140f9e9..be77ad60208 100644 --- a/client/web/src/org/backend.ts +++ b/client/web/src/org/backend.ts @@ -2,7 +2,7 @@ import { concat, Observable } from 'rxjs' import { map, mergeMap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' import { refreshAuthenticatedUser } from '../auth' import { requestGraphQL } from '../backend/graphql' diff --git a/client/web/src/org/settings/OrgSettingsArea.tsx b/client/web/src/org/settings/OrgSettingsArea.tsx index a2a36c6cb1a..917281fcd39 100644 --- a/client/web/src/org/settings/OrgSettingsArea.tsx +++ b/client/web/src/org/settings/OrgSettingsArea.tsx @@ -3,7 +3,7 @@ import MapSearchIcon from 'mdi-react/MapSearchIcon' import * as React from 'react' import { Route, RouteComponentProps, Switch } from 'react-router' -import { useQuery } from '@sourcegraph/shared/src/graphql/apollo' +import { useQuery } from '@sourcegraph/http-client' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/org/settings/members/InviteForm.tsx b/client/web/src/org/settings/members/InviteForm.tsx index de9b8741bf6..015b634720d 100644 --- a/client/web/src/org/settings/members/InviteForm.tsx +++ b/client/web/src/org/settings/members/InviteForm.tsx @@ -7,10 +7,10 @@ import { map } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import { Button, LoadingSpinner } from '@sourcegraph/wildcard' +import { LoadingSpinner, Button } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../../../auth' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/org/settings/members/OrgSettingsMembersPage.tsx b/client/web/src/org/settings/members/OrgSettingsMembersPage.tsx index 8662b1de4a8..087e39a19b3 100644 --- a/client/web/src/org/settings/members/OrgSettingsMembersPage.tsx +++ b/client/web/src/org/settings/members/OrgSettingsMembersPage.tsx @@ -7,8 +7,8 @@ import { Observable, Subject, Subscription } from 'rxjs' import { catchError, distinctUntilChanged, filter, map, startWith, switchMap, tap } from 'rxjs/operators' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Container, PageHeader, Button } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../../../auth' diff --git a/client/web/src/person/PersonLink.tsx b/client/web/src/person/PersonLink.tsx index 07fc047610b..a4865561b13 100644 --- a/client/web/src/person/PersonLink.tsx +++ b/client/web/src/person/PersonLink.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames' import * as React from 'react' +import { gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { PersonLinkFields } from '../graphql-operations' diff --git a/client/web/src/platform/context.ts b/client/web/src/platform/context.ts index 74d96384af3..97f4b5c07e5 100644 --- a/client/web/src/platform/context.ts +++ b/client/web/src/platform/context.ts @@ -2,9 +2,9 @@ import { ApolloQueryResult, ObservableQuery } from '@apollo/client' import { map, publishReplay, refCount, shareReplay } from 'rxjs/operators' import { createAggregateError, asError } from '@sourcegraph/common' -import { fromObservableQueryPromise, getDocumentNode, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { fromObservableQueryPromise, getDocumentNode, gql } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { mutateSettings, updateSettings } from '@sourcegraph/shared/src/settings/edit' import { gqlToCascade } from '@sourcegraph/shared/src/settings/settings' import { LocalStorageSubject } from '@sourcegraph/shared/src/util/LocalStorageSubject' diff --git a/client/web/src/regression/codeintel.test.ts b/client/web/src/regression/codeintel.test.ts index df9f4a705d1..0f7a3f76858 100644 --- a/client/web/src/regression/codeintel.test.ts +++ b/client/web/src/regression/codeintel.test.ts @@ -4,7 +4,7 @@ import expect from 'expect' import { describe, before, after, test } from 'mocha' import { ElementHandle } from 'puppeteer' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { overwriteSettings } from '@sourcegraph/shared/src/settings/edit' import { Config, getConfig } from '@sourcegraph/shared/src/testing/config' import { Driver } from '@sourcegraph/shared/src/testing/driver' diff --git a/client/web/src/regression/core.test.ts b/client/web/src/regression/core.test.ts index 30e7b14a50b..94876bff930 100644 --- a/client/web/src/regression/core.test.ts +++ b/client/web/src/regression/core.test.ts @@ -5,7 +5,7 @@ import expect from 'expect' import { describe, before, beforeEach, after, afterEach, test } from 'mocha' import { map } from 'rxjs/operators' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' // import { overwriteSettings } from '@sourcegraph/shared/src/settings/edit' import { getConfig } from '@sourcegraph/shared/src/testing/config' import { Driver } from '@sourcegraph/shared/src/testing/driver' diff --git a/client/web/src/regression/integrations.test.ts b/client/web/src/regression/integrations.test.ts index 6dba50515ef..68f9d4e7ea8 100644 --- a/client/web/src/regression/integrations.test.ts +++ b/client/web/src/regression/integrations.test.ts @@ -3,7 +3,7 @@ import { merge } from 'rxjs' import { fromFetch } from 'rxjs/fetch' import { catchError } from 'rxjs/operators' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' +import { checkOk } from '@sourcegraph/http-client' import { getConfig } from '@sourcegraph/shared/src/testing/config' describe('Native integrations regression test suite', () => { diff --git a/client/web/src/regression/util/GraphQlClient.ts b/client/web/src/regression/util/GraphQlClient.ts index 06d9c348bc7..ec1757de3db 100644 --- a/client/web/src/regression/util/GraphQlClient.ts +++ b/client/web/src/regression/util/GraphQlClient.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' -import { GraphQLResult, requestGraphQLCommon } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { GraphQLResult, requestGraphQLCommon } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' /** * A GraphQL client to be used from regression test scripts. diff --git a/client/web/src/regression/util/api.ts b/client/web/src/regression/util/api.ts index 6884199a615..2dccdb80e34 100644 --- a/client/web/src/regression/util/api.ts +++ b/client/web/src/regression/util/api.ts @@ -6,19 +6,19 @@ import { zip, timer, concat, throwError, defer, Observable } from 'rxjs' import { map, tap, retryWhen, delayWhen, take, mergeMap } from 'rxjs/operators' import { isErrorLike, createAggregateError } from '@sourcegraph/common' -import { - CloneInProgressError, - isCloneInProgressErrorLike, - isRepoNotFoundErrorLike, -} from '@sourcegraph/shared/src/backend/errors' import { gql, dataOrThrowErrors, createInvalidGraphQLMutationResponseError, isErrorGraphQLResult, -} from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +} from '@sourcegraph/http-client' +import { + CloneInProgressError, + isCloneInProgressErrorLike, + isRepoNotFoundErrorLike, +} from '@sourcegraph/shared/src/backend/errors' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { Config } from '@sourcegraph/shared/src/testing/config' import { GraphQLClient } from './GraphQlClient' diff --git a/client/web/src/regression/util/helpers.ts b/client/web/src/regression/util/helpers.ts index bffde1d7520..c322ec5b5ec 100644 --- a/client/web/src/regression/util/helpers.ts +++ b/client/web/src/regression/util/helpers.ts @@ -6,9 +6,9 @@ import { catchError, map } from 'rxjs/operators' import { Key } from 'ts-key-enum' import { asError } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { PlatformContext } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { overwriteSettings } from '@sourcegraph/shared/src/settings/edit' import { Config } from '@sourcegraph/shared/src/testing/config' import { Driver } from '@sourcegraph/shared/src/testing/driver' diff --git a/client/web/src/regression/util/settings.ts b/client/web/src/regression/util/settings.ts index c9527b55975..24d3680ed47 100644 --- a/client/web/src/regression/util/settings.ts +++ b/client/web/src/regression/util/settings.ts @@ -1,4 +1,4 @@ -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { mutateSettings } from '@sourcegraph/shared/src/settings/edit' import { getUser } from './api' diff --git a/client/web/src/repo/GitReference.tsx b/client/web/src/repo/GitReference.tsx index 57bdd5568fa..095761bb994 100644 --- a/client/web/src/repo/GitReference.tsx +++ b/client/web/src/repo/GitReference.tsx @@ -4,8 +4,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { numberWithCommas } from '@sourcegraph/shared/src/util/strings' import { Badge } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/RepoHeader.tsx b/client/web/src/repo/RepoHeader.tsx index 473ab7056d3..47d8f1a8e77 100644 --- a/client/web/src/repo/RepoHeader.tsx +++ b/client/web/src/repo/RepoHeader.tsx @@ -6,8 +6,8 @@ import { ButtonDropdown, DropdownItem, DropdownMenu } from 'reactstrap' import { ErrorLike } from '@sourcegraph/common' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeOrError } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/repo/RepoRevisionSidebarCommits.tsx b/client/web/src/repo/RepoRevisionSidebarCommits.tsx index 281d7c8c8ea..258cccee816 100644 --- a/client/web/src/repo/RepoRevisionSidebarCommits.tsx +++ b/client/web/src/repo/RepoRevisionSidebarCommits.tsx @@ -6,7 +6,7 @@ import { Link } from 'react-router-dom' import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { createInvalidGraphQLQueryResponseError, dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { createInvalidGraphQLQueryResponseError, dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { RevisionSpec, FileSpec } from '@sourcegraph/shared/src/util/url' import { requestGraphQL } from '../backend/graphql' diff --git a/client/web/src/repo/RepoRevisionSidebarSymbols.test.tsx b/client/web/src/repo/RepoRevisionSidebarSymbols.test.tsx index bc1ac2b319c..7d41d59e7ea 100644 --- a/client/web/src/repo/RepoRevisionSidebarSymbols.test.tsx +++ b/client/web/src/repo/RepoRevisionSidebarSymbols.test.tsx @@ -3,8 +3,8 @@ import { cleanup, fireEvent } from '@testing-library/react' import { escapeRegExp } from 'lodash' import React from 'react' +import { getDocumentNode } from '@sourcegraph/http-client' import { SymbolKind } from '@sourcegraph/shared/src/graphql-operations' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' import { MockedTestProvider, waitForNextApolloResponse } from '@sourcegraph/shared/src/testing/apollo' import { renderWithRouter, RenderWithRouterResult } from '@sourcegraph/shared/src/testing/render-with-router' diff --git a/client/web/src/repo/RepoRevisionSidebarSymbols.tsx b/client/web/src/repo/RepoRevisionSidebarSymbols.tsx index 7fbeb104741..28e228dc46e 100644 --- a/client/web/src/repo/RepoRevisionSidebarSymbols.tsx +++ b/client/web/src/repo/RepoRevisionSidebarSymbols.tsx @@ -5,7 +5,7 @@ import * as React from 'react' import { useState } from 'react' import { NavLink, useLocation } from 'react-router-dom' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { SymbolIcon } from '@sourcegraph/shared/src/symbols/SymbolIcon' import { RevisionSpec } from '@sourcegraph/shared/src/util/url' import { useConnection } from '@sourcegraph/web/src/components/FilteredConnection/hooks/useConnection' diff --git a/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.mocks.ts b/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.mocks.ts index b8ccc362038..b4a356589fd 100644 --- a/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.mocks.ts +++ b/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.mocks.ts @@ -1,6 +1,6 @@ import { MockedResponse } from '@apollo/client/testing' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { RepositoriesForPopoverResult, RepositoryPopoverFields } from '../../graphql-operations' diff --git a/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.tsx b/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.tsx index d79ecad1080..92c54fb3c92 100644 --- a/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.tsx +++ b/client/web/src/repo/RepositoriesPopover/RepositoriesPopover.tsx @@ -1,8 +1,8 @@ import React, { useEffect, useState } from 'react' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { useConnection } from '@sourcegraph/web/src/components/FilteredConnection/hooks/useConnection' import { diff --git a/client/web/src/repo/RevisionsPopover/RevisionsPopover.mocks.ts b/client/web/src/repo/RevisionsPopover/RevisionsPopover.mocks.ts index 450d223c985..65c615f6dab 100644 --- a/client/web/src/repo/RevisionsPopover/RevisionsPopover.mocks.ts +++ b/client/web/src/repo/RevisionsPopover/RevisionsPopover.mocks.ts @@ -1,8 +1,8 @@ import { MockedResponse } from '@apollo/client/testing' import { subDays } from 'date-fns' +import { getDocumentNode } from '@sourcegraph/http-client' import { GitRefType } from '@sourcegraph/shared/src/graphql-operations' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' import { GitCommitAncestorsConnectionFields, diff --git a/client/web/src/repo/RevisionsPopover/RevisionsPopoverCommits.tsx b/client/web/src/repo/RevisionsPopover/RevisionsPopoverCommits.tsx index d348b7f54ef..495f5d32364 100644 --- a/client/web/src/repo/RevisionsPopover/RevisionsPopoverCommits.tsx +++ b/client/web/src/repo/RevisionsPopover/RevisionsPopoverCommits.tsx @@ -3,8 +3,8 @@ import * as H from 'history' import React, { useState } from 'react' import { useLocation } from 'react-router' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { useConnection } from '@sourcegraph/web/src/components/FilteredConnection/hooks/useConnection' import { ConnectionSummary } from '@sourcegraph/web/src/components/FilteredConnection/ui' import { Badge, useDebounce } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/actions/GoToCodeHostAction.story.tsx b/client/web/src/repo/actions/GoToCodeHostAction.story.tsx index 6e00b4fe728..4782931a7f4 100644 --- a/client/web/src/repo/actions/GoToCodeHostAction.story.tsx +++ b/client/web/src/repo/actions/GoToCodeHostAction.story.tsx @@ -7,7 +7,7 @@ import GitlabIcon from 'mdi-react/GitlabIcon' import React, { useEffect, useState } from 'react' import { PhabricatorIcon } from '@sourcegraph/shared/src/components/icons' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/repo/actions/InstallBrowserExtensionAlert.story.tsx b/client/web/src/repo/actions/InstallBrowserExtensionAlert.story.tsx index 13f06aaff15..1629f14cbaf 100644 --- a/client/web/src/repo/actions/InstallBrowserExtensionAlert.story.tsx +++ b/client/web/src/repo/actions/InstallBrowserExtensionAlert.story.tsx @@ -2,7 +2,7 @@ import { action } from '@storybook/addon-actions' import { storiesOf } from '@storybook/react' import React from 'react' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/repo/actions/InstallBrowserExtensionAlert.test.tsx b/client/web/src/repo/actions/InstallBrowserExtensionAlert.test.tsx index 3719fe3c359..20d6e01bcac 100644 --- a/client/web/src/repo/actions/InstallBrowserExtensionAlert.test.tsx +++ b/client/web/src/repo/actions/InstallBrowserExtensionAlert.test.tsx @@ -2,7 +2,7 @@ import { render } from '@testing-library/react' import { noop } from 'lodash' import React from 'react' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { InstallBrowserExtensionAlert } from './InstallBrowserExtensionAlert' diff --git a/client/web/src/repo/actions/InstallBrowserExtensionPopover.tsx b/client/web/src/repo/actions/InstallBrowserExtensionPopover.tsx index cd12facaf7c..c677a5eac3f 100644 --- a/client/web/src/repo/actions/InstallBrowserExtensionPopover.tsx +++ b/client/web/src/repo/actions/InstallBrowserExtensionPopover.tsx @@ -6,7 +6,7 @@ import FocusLock from 'react-focus-lock' import { Popover } from 'reactstrap' import { ButtonLink } from '@sourcegraph/shared/src/components/LinkOrButton' -import { ExternalServiceKind } from '@sourcegraph/shared/src/graphql/schema' +import { ExternalServiceKind } from '@sourcegraph/shared/src/schema' import { SourcegraphIcon } from '../../auth/icons' diff --git a/client/web/src/repo/backend.ts b/client/web/src/repo/backend.ts index 33f42a2a5e8..64fb5817484 100644 --- a/client/web/src/repo/backend.ts +++ b/client/web/src/repo/backend.ts @@ -2,6 +2,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { CloneInProgressError, RepoNotFoundError, @@ -9,7 +10,6 @@ import { RevisionNotFoundError, } from '@sourcegraph/shared/src/backend/errors' import { FetchFileParameters } from '@sourcegraph/shared/src/components/CodeExcerpt' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { AbsoluteRepoFile, diff --git a/client/web/src/repo/blob/backend.ts b/client/web/src/repo/blob/backend.ts index 7907adbe62e..d92883884ce 100644 --- a/client/web/src/repo/blob/backend.ts +++ b/client/web/src/repo/blob/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { ParsedRepoURI, makeRepoURI } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/repo/branches/RepositoryBranchesOverviewPage.tsx b/client/web/src/repo/branches/RepositoryBranchesOverviewPage.tsx index f7e9fe0a441..6f5e9d76eca 100644 --- a/client/web/src/repo/branches/RepositoryBranchesOverviewPage.tsx +++ b/client/web/src/repo/branches/RepositoryBranchesOverviewPage.tsx @@ -6,9 +6,9 @@ import { Observable, Subject, Subscription } from 'rxjs' import { catchError, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators' import { createAggregateError, ErrorLike, isErrorLike, asError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/commit/RepositoryCommitPage.tsx b/client/web/src/repo/commit/RepositoryCommitPage.tsx index 25d4852a95a..ce7997edde8 100644 --- a/client/web/src/repo/commit/RepositoryCommitPage.tsx +++ b/client/web/src/repo/commit/RepositoryCommitPage.tsx @@ -7,15 +7,15 @@ import { catchError, distinctUntilChanged, filter, map, switchMap, tap, withLate import { HoveredToken, createHoverifier, Hoverifier, HoverState } from '@sourcegraph/codeintellify' import { asError, createAggregateError, ErrorLike, isErrorLike, isDefined } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { HoverMerged } from '@sourcegraph/shared/src/api/client/types/hover' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { getHoverActions } from '@sourcegraph/shared/src/hover/actions' import { HoverContext } from '@sourcegraph/shared/src/hover/HoverOverlay' import { getModeFromPath } from '@sourcegraph/shared/src/languages' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' diff --git a/client/web/src/repo/commits/RepositoryCommitsPage.tsx b/client/web/src/repo/commits/RepositoryCommitsPage.tsx index 2327b71aef0..33c3c5730a1 100644 --- a/client/web/src/repo/commits/RepositoryCommitsPage.tsx +++ b/client/web/src/repo/commits/RepositoryCommitsPage.tsx @@ -4,8 +4,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { RevisionSpec, ResolvedRevisionSpec } from '@sourcegraph/shared/src/util/url' import { queryGraphQL } from '../../backend/graphql' diff --git a/client/web/src/repo/compare/RepositoryCompareCommitsPage.tsx b/client/web/src/repo/compare/RepositoryCompareCommitsPage.tsx index ef582b9d59e..da5461d2554 100644 --- a/client/web/src/repo/compare/RepositoryCompareCommitsPage.tsx +++ b/client/web/src/repo/compare/RepositoryCompareCommitsPage.tsx @@ -4,8 +4,8 @@ import { Observable, Subject, Subscription } from 'rxjs' import { distinctUntilChanged, map, startWith } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { queryGraphQL } from '../../backend/graphql' import { FilteredConnection } from '../../components/FilteredConnection' diff --git a/client/web/src/repo/compare/RepositoryCompareDiffPage.tsx b/client/web/src/repo/compare/RepositoryCompareDiffPage.tsx index 631edb32bd7..1807c95b101 100644 --- a/client/web/src/repo/compare/RepositoryCompareDiffPage.tsx +++ b/client/web/src/repo/compare/RepositoryCompareDiffPage.tsx @@ -5,13 +5,13 @@ import { map } from 'rxjs/operators' import { Hoverifier } from '@sourcegraph/codeintellify' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { HoverMerged } from '@sourcegraph/shared/src/api/client/types/hover' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { FileSpec, RepoSpec, ResolvedRevisionSpec, RevisionSpec } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/repo/compare/RepositoryCompareOverviewPage.tsx b/client/web/src/repo/compare/RepositoryCompareOverviewPage.tsx index 46d20f901ef..fffe116ee7b 100644 --- a/client/web/src/repo/compare/RepositoryCompareOverviewPage.tsx +++ b/client/web/src/repo/compare/RepositoryCompareOverviewPage.tsx @@ -5,12 +5,12 @@ import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators import { Hoverifier } from '@sourcegraph/codeintellify' import { asError, createAggregateError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { ActionItemAction } from '@sourcegraph/shared/src/actions/ActionItem' import { HoverMerged } from '@sourcegraph/shared/src/api/client/types/hover' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { FileSpec, RepoSpec, ResolvedRevisionSpec, RevisionSpec } from '@sourcegraph/shared/src/util/url' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/docs/DocumentationExamplesList.tsx b/client/web/src/repo/docs/DocumentationExamplesList.tsx index 9e9d2357ffe..beb0009d06a 100644 --- a/client/web/src/repo/docs/DocumentationExamplesList.tsx +++ b/client/web/src/repo/docs/DocumentationExamplesList.tsx @@ -7,7 +7,7 @@ import { catchError, startWith } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' import { FetchFileParameters } from '@sourcegraph/shared/src/components/CodeExcerpt' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/docs/DocumentationExamplesListItem.tsx b/client/web/src/repo/docs/DocumentationExamplesListItem.tsx index 57cfbf31210..af611a0f38b 100644 --- a/client/web/src/repo/docs/DocumentationExamplesListItem.tsx +++ b/client/web/src/repo/docs/DocumentationExamplesListItem.tsx @@ -9,7 +9,7 @@ import { CodeExcerpt, FetchFileParameters } from '@sourcegraph/shared/src/compon import { Link } from '@sourcegraph/shared/src/components/Link' import { RepoFileLink } from '@sourcegraph/shared/src/components/RepoFileLink' import { RepoIcon } from '@sourcegraph/shared/src/components/RepoIcon' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/repo/docs/graphql.ts b/client/web/src/repo/docs/graphql.ts index ea01c9f5fd7..8c6ba87cdcd 100644 --- a/client/web/src/repo/docs/graphql.ts +++ b/client/web/src/repo/docs/graphql.ts @@ -2,8 +2,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { requestGraphQL } from '../../backend/graphql' import { Scalars } from '../../graphql-operations' diff --git a/client/web/src/repo/releases/RepositoryReleasesTagsPage.test.tsx b/client/web/src/repo/releases/RepositoryReleasesTagsPage.test.tsx index 5cd4bf7ac17..3e9a4235d05 100644 --- a/client/web/src/repo/releases/RepositoryReleasesTagsPage.test.tsx +++ b/client/web/src/repo/releases/RepositoryReleasesTagsPage.test.tsx @@ -3,7 +3,7 @@ import * as H from 'history' import React from 'react' import { of } from 'rxjs' -import { IRepository, IGitRef } from '@sourcegraph/shared/src/graphql/schema' +import { IRepository, IGitRef } from '@sourcegraph/shared/src/schema' import { RepositoryReleasesTagsPage } from './RepositoryReleasesTagsPage' diff --git a/client/web/src/repo/settings/RepoSettingsIndexPage.tsx b/client/web/src/repo/settings/RepoSettingsIndexPage.tsx index a6e0352123d..c879b639ebe 100644 --- a/client/web/src/repo/settings/RepoSettingsIndexPage.tsx +++ b/client/web/src/repo/settings/RepoSettingsIndexPage.tsx @@ -8,9 +8,9 @@ import { Observable, Subject, Subscription } from 'rxjs' import { map, switchMap, tap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { pluralize } from '@sourcegraph/shared/src/util/strings' import { Container, PageHeader, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/repo/settings/RepoSettingsMirrorPage.tsx b/client/web/src/repo/settings/RepoSettingsMirrorPage.tsx index f60dcf4c04a..4099187fbb2 100644 --- a/client/web/src/repo/settings/RepoSettingsMirrorPage.tsx +++ b/client/web/src/repo/settings/RepoSettingsMirrorPage.tsx @@ -8,7 +8,7 @@ import { interval, Subject, Subscription } from 'rxjs' import { catchError, switchMap, tap } from 'rxjs/operators' import { asError } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Container, PageHeader, LoadingSpinner, FeedbackText, Button } from '@sourcegraph/wildcard' import { ErrorAlert } from '../../components/alerts' diff --git a/client/web/src/repo/settings/backend.ts b/client/web/src/repo/settings/backend.ts index d695b89c2de..befc18d35de 100644 --- a/client/web/src/repo/settings/backend.ts +++ b/client/web/src/repo/settings/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { RepoNotFoundError } from '@sourcegraph/shared/src/backend/errors' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { requestGraphQL } from '../../backend/graphql' import { diff --git a/client/web/src/repo/stats/RepositoryStatsContributorsPage.tsx b/client/web/src/repo/stats/RepositoryStatsContributorsPage.tsx index 371f2ffd80a..fc4da4de45c 100644 --- a/client/web/src/repo/stats/RepositoryStatsContributorsPage.tsx +++ b/client/web/src/repo/stats/RepositoryStatsContributorsPage.tsx @@ -7,9 +7,9 @@ import { map } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { createAggregateError } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Scalars, SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { numberWithCommas, pluralize } from '@sourcegraph/shared/src/util/strings' import { buildSearchURLQuery } from '@sourcegraph/shared/src/util/url' diff --git a/client/web/src/repo/tree/TreeEntriesSection.tsx b/client/web/src/repo/tree/TreeEntriesSection.tsx index 0bcc33d2c03..e4755ffc5ce 100644 --- a/client/web/src/repo/tree/TreeEntriesSection.tsx +++ b/client/web/src/repo/tree/TreeEntriesSection.tsx @@ -6,7 +6,7 @@ import React from 'react' import { FileDecorationsByPath } from '@sourcegraph/shared/src/api/extension/extensionHostApi' import { Link } from '@sourcegraph/shared/src/components/Link' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { FileDecorator } from '../../tree/FileDecorator' diff --git a/client/web/src/repo/tree/TreePage.tsx b/client/web/src/repo/tree/TreePage.tsx index 14a354b6d1c..c8b398b56a4 100644 --- a/client/web/src/repo/tree/TreePage.tsx +++ b/client/web/src/repo/tree/TreePage.tsx @@ -17,6 +17,7 @@ import { Observable, EMPTY } from 'rxjs' import { catchError, map } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { ActionItem } from '@sourcegraph/shared/src/actions/ActionItem' import { ActionsContainer } from '@sourcegraph/shared/src/actions/ActionsContainer' import { FileDecorationsByPath } from '@sourcegraph/shared/src/api/extension/extensionHostApi' @@ -24,9 +25,8 @@ import { ContributableMenu } from '@sourcegraph/shared/src/api/protocol' import { ActivationProps } from '@sourcegraph/shared/src/components/activation/Activation' import { displayRepoName } from '@sourcegraph/shared/src/components/RepoFileLink' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/savedSearches/SavedSearchListPage.tsx b/client/web/src/savedSearches/SavedSearchListPage.tsx index 70868168614..733b3819a3c 100644 --- a/client/web/src/savedSearches/SavedSearchListPage.tsx +++ b/client/web/src/savedSearches/SavedSearchListPage.tsx @@ -10,7 +10,7 @@ import { Subject, Subscription } from 'rxjs' import { catchError, map, mapTo, startWith, switchMap } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { buildSearchURLQuery } from '@sourcegraph/shared/src/util/url' import { Container, PageHeader, LoadingSpinner, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/savedSearches/SavedSearchUpdateForm.tsx b/client/web/src/savedSearches/SavedSearchUpdateForm.tsx index 48a4b49ecc5..f2a254d0a44 100644 --- a/client/web/src/savedSearches/SavedSearchUpdateForm.tsx +++ b/client/web/src/savedSearches/SavedSearchUpdateForm.tsx @@ -15,7 +15,7 @@ import { import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { LoadingSpinner } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/search/backend.tsx b/client/web/src/search/backend.tsx index 8cd54e02f85..58ba1cdef15 100644 --- a/client/web/src/search/backend.tsx +++ b/client/web/src/search/backend.tsx @@ -2,8 +2,8 @@ import { Observable, of } from 'rxjs' import { map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { memoizeObservable } from '@sourcegraph/shared/src/util/memoizeObservable' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/search/helpers.test.tsx b/client/web/src/search/helpers.test.tsx index a843564e59a..fd10ae68499 100644 --- a/client/web/src/search/helpers.test.tsx +++ b/client/web/src/search/helpers.test.tsx @@ -1,6 +1,6 @@ import * as H from 'history' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { getSearchTypeFromQuery, toggleSearchType, toggleSubquery, submitSearch } from './helpers' import { SearchType } from './results/StreamingSearchResults' diff --git a/client/web/src/search/helpers.tsx b/client/web/src/search/helpers.tsx index 204b9133abf..db2b0afb097 100644 --- a/client/web/src/search/helpers.tsx +++ b/client/web/src/search/helpers.tsx @@ -1,7 +1,7 @@ import * as H from 'history' import { ActivationProps } from '@sourcegraph/shared/src/components/activation/Activation' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { CharacterRange } from '@sourcegraph/shared/src/search/query/token' import { appendContextFilter } from '@sourcegraph/shared/src/search/query/transformer' diff --git a/client/web/src/search/index.tsx b/client/web/src/search/index.tsx index b9db8dd1e43..6a230863c71 100644 --- a/client/web/src/search/index.tsx +++ b/client/web/src/search/index.tsx @@ -3,7 +3,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import { ISavedSearch } from '@sourcegraph/shared/src/graphql/schema' +import { ISavedSearch } from '@sourcegraph/shared/src/schema' import { discreteValueAliases, escapeSpaces } from '@sourcegraph/shared/src/search/query/filters' import { findFilter, FilterKind } from '@sourcegraph/shared/src/search/query/query' import { AggregateStreamingSearchResults, StreamSearchOptions } from '@sourcegraph/shared/src/search/stream' diff --git a/client/web/src/search/input/SearchContextMenu.test.tsx b/client/web/src/search/input/SearchContextMenu.test.tsx index 4385ddd3638..f29b6923b36 100644 --- a/client/web/src/search/input/SearchContextMenu.test.tsx +++ b/client/web/src/search/input/SearchContextMenu.test.tsx @@ -6,7 +6,7 @@ import { DropdownMenu, UncontrolledDropdown } from 'reactstrap' import { Observable, of, throwError } from 'rxjs' import sinon from 'sinon' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { mockGetUserSearchContextNamespaces } from '@sourcegraph/shared/src/testing/searchContexts/testHelpers' import { MockIntersectionObserver } from '@sourcegraph/shared/src/util/MockIntersectionObserver' diff --git a/client/web/src/search/input/SearchContextMenu.tsx b/client/web/src/search/input/SearchContextMenu.tsx index 447f82b01aa..85e262c2d95 100644 --- a/client/web/src/search/input/SearchContextMenu.tsx +++ b/client/web/src/search/input/SearchContextMenu.tsx @@ -15,7 +15,7 @@ import { catchError, debounce, switchMap, tap } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' import { Link } from '@sourcegraph/shared/src/components/Link' -import { ISearchContext } from '@sourcegraph/shared/src/graphql/schema' +import { ISearchContext } from '@sourcegraph/shared/src/schema' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { Badge, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/search/notebook/NotebookContent.tsx b/client/web/src/search/notebook/NotebookContent.tsx index b6fff3b909d..120e04d0090 100644 --- a/client/web/src/search/notebook/NotebookContent.tsx +++ b/client/web/src/search/notebook/NotebookContent.tsx @@ -2,7 +2,7 @@ import { noop } from 'lodash' import React, { useMemo } from 'react' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { NotebookBlock } from '@sourcegraph/shared/src/graphql/schema' +import { NotebookBlock } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/search/notebook/SearchNotebook.tsx b/client/web/src/search/notebook/SearchNotebook.tsx index 90be4f7e917..f2794f64282 100644 --- a/client/web/src/search/notebook/SearchNotebook.tsx +++ b/client/web/src/search/notebook/SearchNotebook.tsx @@ -6,7 +6,7 @@ import { Observable } from 'rxjs' import { startWith, switchMap, tap } from 'rxjs/operators' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { fetchStreamSuggestions } from '@sourcegraph/shared/src/search/suggestions' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/search/notebook/SearchNotebookQueryBlock.tsx b/client/web/src/search/notebook/SearchNotebookQueryBlock.tsx index d837b09ed83..05cce4385a6 100644 --- a/client/web/src/search/notebook/SearchNotebookQueryBlock.tsx +++ b/client/web/src/search/notebook/SearchNotebookQueryBlock.tsx @@ -8,7 +8,7 @@ import { useLocation } from 'react-router' import { Observable, of } from 'rxjs' import { FetchFileParameters } from '@sourcegraph/shared/src/components/CodeExcerpt' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/search/notebook/backend.ts b/client/web/src/search/notebook/backend.ts index 616cda7a4d8..9db3650d5c5 100644 --- a/client/web/src/search/notebook/backend.ts +++ b/client/web/src/search/notebook/backend.ts @@ -1,8 +1,8 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { requestGraphQL } from '../../backend/graphql' import { diff --git a/client/web/src/search/notebook/index.ts b/client/web/src/search/notebook/index.ts index 93d44f67b79..01aba9f165f 100644 --- a/client/web/src/search/notebook/index.ts +++ b/client/web/src/search/notebook/index.ts @@ -8,7 +8,7 @@ import { transformSearchQuery } from '@sourcegraph/shared/src/api/client/search' import { FlatExtensionHostAPI } from '@sourcegraph/shared/src/api/contract' import { FetchFileParameters } from '@sourcegraph/shared/src/components/CodeExcerpt' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import { IHighlightLineRange } from '@sourcegraph/shared/src/graphql/schema' +import { IHighlightLineRange } from '@sourcegraph/shared/src/schema' import { aggregateStreamingSearch, AggregateStreamingSearchResults, diff --git a/client/web/src/search/notebook/serialize.ts b/client/web/src/search/notebook/serialize.ts index 1240bce5843..72644d310e3 100644 --- a/client/web/src/search/notebook/serialize.ts +++ b/client/web/src/search/notebook/serialize.ts @@ -1,4 +1,4 @@ -import { IHighlightLineRange, NotebookBlock } from '@sourcegraph/shared/src/graphql/schema' +import { IHighlightLineRange, NotebookBlock } from '@sourcegraph/shared/src/schema' import { toAbsoluteBlobURL } from '@sourcegraph/shared/src/util/url' import { CreateNotebookBlockInput, NotebookBlockType } from '../../graphql-operations' diff --git a/client/web/src/search/panels/SavedSearchesPanel.story.tsx b/client/web/src/search/panels/SavedSearchesPanel.story.tsx index 263a4591c9b..7c880039d44 100644 --- a/client/web/src/search/panels/SavedSearchesPanel.story.tsx +++ b/client/web/src/search/panels/SavedSearchesPanel.story.tsx @@ -2,7 +2,7 @@ import { storiesOf } from '@storybook/react' import React from 'react' import { NEVER, of } from 'rxjs' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { NOOP_TELEMETRY_SERVICE } from '@sourcegraph/shared/src/telemetry/telemetryService' import { WebStory } from '../../components/WebStory' diff --git a/client/web/src/search/panels/SavedSearchesPanel.tsx b/client/web/src/search/panels/SavedSearchesPanel.tsx index df212fd0dcc..1aed5c3e291 100644 --- a/client/web/src/search/panels/SavedSearchesPanel.tsx +++ b/client/web/src/search/panels/SavedSearchesPanel.tsx @@ -5,7 +5,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react' import { Observable } from 'rxjs' import { Link } from '@sourcegraph/shared/src/components/Link' -import { ISavedSearch } from '@sourcegraph/shared/src/graphql/schema' +import { ISavedSearch } from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/search/panels/utils.ts b/client/web/src/search/panels/utils.ts index 9af952327bd..62766cca20c 100644 --- a/client/web/src/search/panels/utils.ts +++ b/client/web/src/search/panels/utils.ts @@ -1,6 +1,6 @@ import { Observable, of } from 'rxjs' -import { ISavedSearch, Namespace, IOrg, IUser } from '@sourcegraph/shared/src/graphql/schema' +import { ISavedSearch, Namespace, IOrg, IUser } from '@sourcegraph/shared/src/schema' import { AuthenticatedUser } from '../../auth' import { EventLogResult } from '../backend' diff --git a/client/web/src/search/results/sidebar/Revisions.mocks.ts b/client/web/src/search/results/sidebar/Revisions.mocks.ts index c010ee48462..44229848342 100644 --- a/client/web/src/search/results/sidebar/Revisions.mocks.ts +++ b/client/web/src/search/results/sidebar/Revisions.mocks.ts @@ -1,7 +1,7 @@ import { MockedResponse } from '@apollo/client/testing' import { GraphQLError } from 'graphql' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { GitRefType } from '../../../../../shared/src/graphql-operations' import { diff --git a/client/web/src/search/results/sidebar/Revisions.tsx b/client/web/src/search/results/sidebar/Revisions.tsx index 30a4827242d..b678f6436bf 100644 --- a/client/web/src/search/results/sidebar/Revisions.tsx +++ b/client/web/src/search/results/sidebar/Revisions.tsx @@ -2,8 +2,8 @@ import { Tab, TabList, TabPanel, TabPanels, Tabs } from '@reach/tabs' import classNames from 'classnames' import React from 'react' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import { GitRefType } from '@sourcegraph/shared/src/graphql/schema' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import { GitRefType } from '@sourcegraph/shared/src/schema' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/search/useQueryIntelligence.ts b/client/web/src/search/useQueryIntelligence.ts index 0bc71f4a521..2b365257f06 100644 --- a/client/web/src/search/useQueryIntelligence.ts +++ b/client/web/src/search/useQueryIntelligence.ts @@ -3,7 +3,7 @@ import { useEffect, useMemo } from 'react' import { Observable } from 'rxjs' import * as uuid from 'uuid' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { getDiagnostics } from '@sourcegraph/shared/src/search/query/diagnostics' import { getProviders } from '@sourcegraph/shared/src/search/query/providers' import { scanSearchQuery } from '@sourcegraph/shared/src/search/query/scanner' diff --git a/client/web/src/sentry/shouldErrorBeReported.test.ts b/client/web/src/sentry/shouldErrorBeReported.test.ts index 218fc4a2f83..8406c19f8e5 100644 --- a/client/web/src/sentry/shouldErrorBeReported.test.ts +++ b/client/web/src/sentry/shouldErrorBeReported.test.ts @@ -1,5 +1,5 @@ +import { HTTPStatusError } from '@sourcegraph/http-client' import { AbortError } from '@sourcegraph/shared/src/api/util' -import { HTTPStatusError } from '@sourcegraph/shared/src/backend/fetch' import { shouldErrorBeReported } from './shouldErrorBeReported' diff --git a/client/web/src/sentry/shouldErrorBeReported.ts b/client/web/src/sentry/shouldErrorBeReported.ts index 382113f0b1a..3bb56bd9439 100644 --- a/client/web/src/sentry/shouldErrorBeReported.ts +++ b/client/web/src/sentry/shouldErrorBeReported.ts @@ -1,5 +1,5 @@ import { isErrorLike } from '@sourcegraph/common' -import { HTTPStatusError } from '@sourcegraph/shared/src/backend/fetch' +import { HTTPStatusError } from '@sourcegraph/http-client' export function shouldErrorBeReported(error: unknown): boolean { if (error instanceof HTTPStatusError) { diff --git a/client/web/src/settings/SettingsArea.tsx b/client/web/src/settings/SettingsArea.tsx index da0c314826c..ca2ea4c9ab6 100644 --- a/client/web/src/settings/SettingsArea.tsx +++ b/client/web/src/settings/SettingsArea.tsx @@ -7,13 +7,13 @@ import { combineLatest, from, Observable, of, Subject, Subscription } from 'rxjs import { catchError, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators' import { asError, createAggregateError, ErrorLike, isErrorLike, isDefined } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { getConfiguredSideloadedExtension } from '@sourcegraph/shared/src/api/client/enabledExtensions' import { extensionIDsFromSettings } from '@sourcegraph/shared/src/extensions/extension' import { queryConfiguredRegistryExtensions } from '@sourcegraph/shared/src/extensions/helpers' import { Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { gqlToCascade, SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/settings/SettingsFile.tsx b/client/web/src/settings/SettingsFile.tsx index 9839395dc40..7d5f0daf1de 100644 --- a/client/web/src/settings/SettingsFile.tsx +++ b/client/web/src/settings/SettingsFile.tsx @@ -5,7 +5,7 @@ import * as React from 'react' import { Subject, Subscription } from 'rxjs' import { distinctUntilChanged, filter, map, startWith } from 'rxjs/operators' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/settings/temporary/TemporarySettingsStorage.ts b/client/web/src/settings/temporary/TemporarySettingsStorage.ts index ff7c2338c85..b25fc33691f 100644 --- a/client/web/src/settings/temporary/TemporarySettingsStorage.ts +++ b/client/web/src/settings/temporary/TemporarySettingsStorage.ts @@ -3,7 +3,7 @@ import { isEqual } from 'lodash' import { Observable, of, Subscription, from, ReplaySubject, Subscriber } from 'rxjs' import { distinctUntilChanged, map } from 'rxjs/operators' -import { fromObservableQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { fromObservableQuery } from '@sourcegraph/http-client' import { GetTemporarySettingsResult } from '../../graphql-operations' diff --git a/client/web/src/settings/tokens/AccessTokenNode.tsx b/client/web/src/settings/tokens/AccessTokenNode.tsx index 0e09e3b2401..719d7890f07 100644 --- a/client/web/src/settings/tokens/AccessTokenNode.tsx +++ b/client/web/src/settings/tokens/AccessTokenNode.tsx @@ -4,7 +4,7 @@ import { Link } from 'react-router-dom' import { map, mapTo } from 'rxjs/operators' import { asError, isErrorLike } from '@sourcegraph/common' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { Button } from '@sourcegraph/wildcard' import { requestGraphQL } from '../../backend/graphql' diff --git a/client/web/src/site-admin/SiteAdminAllUsersPage.tsx b/client/web/src/site-admin/SiteAdminAllUsersPage.tsx index fd8c7fefcc0..65473ed1a3c 100644 --- a/client/web/src/site-admin/SiteAdminAllUsersPage.tsx +++ b/client/web/src/site-admin/SiteAdminAllUsersPage.tsx @@ -11,7 +11,7 @@ import { merge, of, Subject, Subscription } from 'rxjs' import { catchError, distinctUntilChanged, map, switchMap } from 'rxjs/operators' import { asError } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/site-admin/SiteAdminArea.tsx b/client/web/src/site-admin/SiteAdminArea.tsx index b0dd67e47fc..5d23708029c 100644 --- a/client/web/src/site-admin/SiteAdminArea.tsx +++ b/client/web/src/site-admin/SiteAdminArea.tsx @@ -3,8 +3,8 @@ import React, { useLayoutEffect, useRef } from 'react' import { Route, RouteComponentProps, Switch, useLocation } from 'react-router' import { ActivationProps } from '@sourcegraph/shared/src/components/activation/Activation' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { PageHeader, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/site-admin/SiteAdminConfigurationPage.tsx b/client/web/src/site-admin/SiteAdminConfigurationPage.tsx index 8be3a88a61d..9bcf3357f9b 100644 --- a/client/web/src/site-admin/SiteAdminConfigurationPage.tsx +++ b/client/web/src/site-admin/SiteAdminConfigurationPage.tsx @@ -8,7 +8,7 @@ import { Link } from 'react-router-dom' import { Subject, Subscription } from 'rxjs' import { catchError, concatMap, delay, mergeMap, retryWhen, tap, timeout } from 'rxjs/operators' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { Button, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/site-admin/SiteAdminCreateUserPage.tsx b/client/web/src/site-admin/SiteAdminCreateUserPage.tsx index 954a62c424a..81b3a158cdb 100644 --- a/client/web/src/site-admin/SiteAdminCreateUserPage.tsx +++ b/client/web/src/site-admin/SiteAdminCreateUserPage.tsx @@ -7,7 +7,7 @@ import { catchError, mergeMap, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError } from '@sourcegraph/common' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { EmailInput, UsernameInput } from '../auth/SignInSignUpCommon' diff --git a/client/web/src/site-admin/SiteAdminPingsPage.tsx b/client/web/src/site-admin/SiteAdminPingsPage.tsx index cf9dac9800b..b2e1b8ede92 100644 --- a/client/web/src/site-admin/SiteAdminPingsPage.tsx +++ b/client/web/src/site-admin/SiteAdminPingsPage.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useMemo } from 'react' import { RouteComponentProps } from 'react-router-dom' import { fromFetch } from 'rxjs/fetch' -import { checkOk } from '@sourcegraph/shared/src/backend/fetch' +import { checkOk } from '@sourcegraph/http-client' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/site-admin/SiteAdminSettingsPage.tsx b/client/web/src/site-admin/SiteAdminSettingsPage.tsx index 372de66cad9..7d07aceac0d 100644 --- a/client/web/src/site-admin/SiteAdminSettingsPage.tsx +++ b/client/web/src/site-admin/SiteAdminSettingsPage.tsx @@ -1,8 +1,8 @@ import * as React from 'react' import { RouteComponentProps } from 'react-router' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' diff --git a/client/web/src/site-admin/SiteAdminTokensPage.tsx b/client/web/src/site-admin/SiteAdminTokensPage.tsx index f08c9db9207..9508dff46bb 100644 --- a/client/web/src/site-admin/SiteAdminTokensPage.tsx +++ b/client/web/src/site-admin/SiteAdminTokensPage.tsx @@ -5,8 +5,8 @@ import { RouteComponentProps } from 'react-router' import { Observable, Subject } from 'rxjs' import { map } from 'rxjs/operators' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { LinkOrSpan } from '@sourcegraph/shared/src/components/LinkOrSpan' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/site-admin/SiteAdminUsageStatisticsPage.tsx b/client/web/src/site-admin/SiteAdminUsageStatisticsPage.tsx index d3a8a47fdb9..e3700b93564 100644 --- a/client/web/src/site-admin/SiteAdminUsageStatisticsPage.tsx +++ b/client/web/src/site-admin/SiteAdminUsageStatisticsPage.tsx @@ -5,7 +5,7 @@ import { RouteComponentProps } from 'react-router' import { Subscription } from 'rxjs' import { UserActivePeriod } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { Button } from '@sourcegraph/wildcard' import { ErrorAlert } from '../components/alerts' diff --git a/client/web/src/site-admin/backend.ts b/client/web/src/site-admin/backend.ts index 96f5428a8ec..af19e496bb4 100644 --- a/client/web/src/site-admin/backend.ts +++ b/client/web/src/site-admin/backend.ts @@ -8,8 +8,8 @@ import { dataOrThrowErrors, isErrorGraphQLResult, gql, -} from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +} from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Settings } from '@sourcegraph/shared/src/settings/settings' import { resetAllMemoizationCaches } from '@sourcegraph/shared/src/util/memoizeObservable' import { repeatUntil } from '@sourcegraph/shared/src/util/rxjs/repeatUntil' diff --git a/client/web/src/site-admin/overview/SiteAdminOverviewPage.test.tsx b/client/web/src/site-admin/overview/SiteAdminOverviewPage.test.tsx index c5d192dae22..fedbc8d3603 100644 --- a/client/web/src/site-admin/overview/SiteAdminOverviewPage.test.tsx +++ b/client/web/src/site-admin/overview/SiteAdminOverviewPage.test.tsx @@ -4,7 +4,7 @@ import React from 'react' import { of } from 'rxjs' import sinon from 'sinon' -import { ISiteUsagePeriod } from '@sourcegraph/shared/src/graphql/schema' +import { ISiteUsagePeriod } from '@sourcegraph/shared/src/schema' import { PageTitle } from '../../components/PageTitle' diff --git a/client/web/src/site-admin/overview/SiteAdminOverviewPage.tsx b/client/web/src/site-admin/overview/SiteAdminOverviewPage.tsx index 398eb7f86d4..8c8fcecd2ef 100644 --- a/client/web/src/site-admin/overview/SiteAdminOverviewPage.tsx +++ b/client/web/src/site-admin/overview/SiteAdminOverviewPage.tsx @@ -4,11 +4,11 @@ import { Observable, of } from 'rxjs' import { map, catchError } from 'rxjs/operators' import { ErrorLike, asError, isErrorLike } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { ActivationProps, percentageDone } from '@sourcegraph/shared/src/components/activation/Activation' import { ActivationChecklist } from '@sourcegraph/shared/src/components/activation/ActivationChecklist' import { Link } from '@sourcegraph/shared/src/components/Link' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { numberWithCommas, pluralize } from '@sourcegraph/shared/src/util/strings' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/site-admin/webhooks/WebhookLogPageHeader.tsx b/client/web/src/site-admin/webhooks/WebhookLogPageHeader.tsx index 8c37f9a719b..58fd42d1754 100644 --- a/client/web/src/site-admin/webhooks/WebhookLogPageHeader.tsx +++ b/client/web/src/site-admin/webhooks/WebhookLogPageHeader.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames' import AlertCircleIcon from 'mdi-react/AlertCircleIcon' import React, { useCallback } from 'react' -import { useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { useQuery } from '@sourcegraph/http-client' import { Button, Select } from '@sourcegraph/wildcard' import { WebhookLogPageHeaderResult } from '../../graphql-operations' diff --git a/client/web/src/site-admin/webhooks/backend.ts b/client/web/src/site-admin/webhooks/backend.ts index f9e2103cf7c..4bdb763e6d7 100644 --- a/client/web/src/site-admin/webhooks/backend.ts +++ b/client/web/src/site-admin/webhooks/backend.ts @@ -1,7 +1,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { requestGraphQL } from '../../backend/graphql' import { diff --git a/client/web/src/site-admin/webhooks/story/fixtures.ts b/client/web/src/site-admin/webhooks/story/fixtures.ts index b3c334c4306..7f06da2b18d 100644 --- a/client/web/src/site-admin/webhooks/story/fixtures.ts +++ b/client/web/src/site-admin/webhooks/story/fixtures.ts @@ -1,7 +1,7 @@ import { MockedResponse } from '@apollo/client/testing' import { number, text } from '@storybook/addon-knobs' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/apollo' +import { getDocumentNode } from '@sourcegraph/http-client' import { WebhookLogFields, diff --git a/client/web/src/site/backend.ts b/client/web/src/site/backend.ts index 54ff03309f3..2a605bafd60 100644 --- a/client/web/src/site/backend.ts +++ b/client/web/src/site/backend.ts @@ -2,7 +2,7 @@ import { Observable, ReplaySubject } from 'rxjs' import { filter, mergeMap, take, tap } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' +import { gql } from '@sourcegraph/http-client' import { authRequired } from '../auth' import { requestGraphQL } from '../backend/graphql' diff --git a/client/web/src/stores/navbarSearchQueryState.ts b/client/web/src/stores/navbarSearchQueryState.ts index 537192dc03a..a921de53140 100644 --- a/client/web/src/stores/navbarSearchQueryState.ts +++ b/client/web/src/stores/navbarSearchQueryState.ts @@ -5,7 +5,7 @@ // (see https://github.com/sourcegraph/sourcegraph/issues/21200). import create from 'zustand' -import { SearchPatternType } from '@sourcegraph/shared/src/graphql/schema' +import { SearchPatternType } from '@sourcegraph/shared/src/schema' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { appendFilter, updateFilter } from '@sourcegraph/shared/src/search/query/transformer' import { filterExists } from '@sourcegraph/shared/src/search/query/validate' diff --git a/client/web/src/stores/searchStack.ts b/client/web/src/stores/searchStack.ts index 8380e64db05..e53841eb507 100644 --- a/client/web/src/stores/searchStack.ts +++ b/client/web/src/stores/searchStack.ts @@ -2,7 +2,7 @@ import { useEffect } from 'react' import create from 'zustand' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import { IHighlightLineRange } from '@sourcegraph/shared/src/graphql/schema' +import { IHighlightLineRange } from '@sourcegraph/shared/src/schema' import { FilterType } from '@sourcegraph/shared/src/search/query/filters' import { FilterKind, findFilter } from '@sourcegraph/shared/src/search/query/query' import { omitFilter } from '@sourcegraph/shared/src/search/query/transformer' diff --git a/client/web/src/tracking/withActivation.tsx b/client/web/src/tracking/withActivation.tsx index 333c84719be..611ca3be4f4 100644 --- a/client/web/src/tracking/withActivation.tsx +++ b/client/web/src/tracking/withActivation.tsx @@ -4,13 +4,13 @@ import { combineLatest, merge, Observable, Subject, Subscription } from 'rxjs' import { distinctUntilChanged, first, map, scan, startWith, switchMap, tap } from 'rxjs/operators' import { Subtract } from 'utility-types' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { ActivationCompletionStatus, ActivationProps, ActivationStep, } from '@sourcegraph/shared/src/components/activation/Activation' import { UserEvent } from '@sourcegraph/shared/src/graphql-operations' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' import { PageRoutes } from '@sourcegraph/web/src/routes.constants' import { AuthenticatedUser } from '../auth' diff --git a/client/web/src/user/area/UserArea.tsx b/client/web/src/user/area/UserArea.tsx index 0683fb3fb93..11ad115a069 100644 --- a/client/web/src/user/area/UserArea.tsx +++ b/client/web/src/user/area/UserArea.tsx @@ -2,9 +2,9 @@ import MapSearchIcon from 'mdi-react/MapSearchIcon' import React, { useMemo } from 'react' import { Route, RouteComponentProps, Switch } from 'react-router' +import { gql, useQuery } from '@sourcegraph/http-client' import { ActivationProps } from '@sourcegraph/shared/src/components/activation/Activation' import { ExtensionsControllerProps } from '@sourcegraph/shared/src/extensions/controller' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' import { PlatformContextProps } from '@sourcegraph/shared/src/platform/context' import { SettingsCascadeProps } from '@sourcegraph/shared/src/settings/settings' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' diff --git a/client/web/src/user/settings/UserSettingsArea.tsx b/client/web/src/user/settings/UserSettingsArea.tsx index 627db6d195f..16bf895d2af 100644 --- a/client/web/src/user/settings/UserSettingsArea.tsx +++ b/client/web/src/user/settings/UserSettingsArea.tsx @@ -3,7 +3,7 @@ import MapSearchIcon from 'mdi-react/MapSearchIcon' import React from 'react' import { Route, RouteComponentProps, Switch } from 'react-router' -import { gql, useQuery } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, useQuery } from '@sourcegraph/http-client' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { ThemeProps } from '@sourcegraph/shared/src/theme' import { LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx b/client/web/src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx index e9da7c7a0cc..9f56a4ad3f3 100644 --- a/client/web/src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx +++ b/client/web/src/user/settings/accessTokens/UserSettingsCreateAccessTokenPage.tsx @@ -6,8 +6,8 @@ import { catchError, concatMap, map, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, createAggregateError, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { Container, PageHeader, LoadingSpinner, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/user/settings/accessTokens/UserSettingsTokensPage.tsx b/client/web/src/user/settings/accessTokens/UserSettingsTokensPage.tsx index f31ae2e6634..b617b9454ce 100644 --- a/client/web/src/user/settings/accessTokens/UserSettingsTokensPage.tsx +++ b/client/web/src/user/settings/accessTokens/UserSettingsTokensPage.tsx @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom' import { Observable, Subject } from 'rxjs' import { map } from 'rxjs/operators' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { Container, PageHeader, Button } from '@sourcegraph/wildcard' diff --git a/client/web/src/user/settings/auth/RemoveExternalAccountModal.tsx b/client/web/src/user/settings/auth/RemoveExternalAccountModal.tsx index db17788052f..8264a626c0c 100644 --- a/client/web/src/user/settings/auth/RemoveExternalAccountModal.tsx +++ b/client/web/src/user/settings/auth/RemoveExternalAccountModal.tsx @@ -3,7 +3,7 @@ import React, { useCallback, useState } from 'react' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, ErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { Button } from '@sourcegraph/wildcard' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/user/settings/auth/UserSettingsSecurityPage.tsx b/client/web/src/user/settings/auth/UserSettingsSecurityPage.tsx index 41db4ecf2be..62250feb6d1 100644 --- a/client/web/src/user/settings/auth/UserSettingsSecurityPage.tsx +++ b/client/web/src/user/settings/auth/UserSettingsSecurityPage.tsx @@ -4,8 +4,8 @@ import { catchError, filter, mergeMap, tap } from 'rxjs/operators' import { Form } from '@sourcegraph/branded/src/components/Form' import { ErrorLike, asError } from '@sourcegraph/common' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { Container, PageHeader, LoadingSpinner, Button } from '@sourcegraph/wildcard' import { AuthenticatedUser } from '../../../auth' diff --git a/client/web/src/user/settings/backend.tsx b/client/web/src/user/settings/backend.tsx index c385525cce9..1996f7c8061 100644 --- a/client/web/src/user/settings/backend.tsx +++ b/client/web/src/user/settings/backend.tsx @@ -2,8 +2,8 @@ import { EMPTY, Observable, Subject } from 'rxjs' import { bufferTime, catchError, concatMap, map } from 'rxjs/operators' import { createAggregateError } from '@sourcegraph/common' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { UserEvent, EventSource, Scalars } from '@sourcegraph/shared/src/graphql-operations' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' import { requestGraphQL } from '../../backend/graphql' import { diff --git a/client/web/src/user/settings/emails/AddUserEmailForm.tsx b/client/web/src/user/settings/emails/AddUserEmailForm.tsx index 4c623e4eb30..5aa2439e606 100644 --- a/client/web/src/user/settings/emails/AddUserEmailForm.tsx +++ b/client/web/src/user/settings/emails/AddUserEmailForm.tsx @@ -3,7 +3,7 @@ import React, { FunctionComponent, useMemo, useState } from 'react' import { LoaderInput } from '@sourcegraph/branded/src/components/LoaderInput' import { asError, isErrorLike, ErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { useInputValidation, deriveInputClassName } from '@sourcegraph/shared/src/util/useInputValidation' import { requestGraphQL } from '../../../backend/graphql' diff --git a/client/web/src/user/settings/emails/SetUserPrimaryEmailForm.tsx b/client/web/src/user/settings/emails/SetUserPrimaryEmailForm.tsx index b095948ec2b..4a2f9e15399 100644 --- a/client/web/src/user/settings/emails/SetUserPrimaryEmailForm.tsx +++ b/client/web/src/user/settings/emails/SetUserPrimaryEmailForm.tsx @@ -3,7 +3,7 @@ import React, { useState, FunctionComponent, useCallback } from 'react' import { Form } from '@sourcegraph/branded/src/components/Form' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { requestGraphQL } from '../../../backend/graphql' import { ErrorAlert } from '../../../components/alerts' diff --git a/client/web/src/user/settings/emails/UserEmail.tsx b/client/web/src/user/settings/emails/UserEmail.tsx index ea421d8cc28..dbf07efc03b 100644 --- a/client/web/src/user/settings/emails/UserEmail.tsx +++ b/client/web/src/user/settings/emails/UserEmail.tsx @@ -1,8 +1,8 @@ import React, { useState, FunctionComponent } from 'react' import { asError, ErrorLike } from '@sourcegraph/common' -import { dataOrThrowErrors, gql } from '@sourcegraph/shared/src/graphql/graphql' -import { Button, Badge } from '@sourcegraph/wildcard' +import { dataOrThrowErrors, gql } from '@sourcegraph/http-client' +import { Badge, Button } from '@sourcegraph/wildcard' import { requestGraphQL } from '../../../backend/graphql' import { diff --git a/client/web/src/user/settings/emails/UserSettingsEmailsPage.tsx b/client/web/src/user/settings/emails/UserSettingsEmailsPage.tsx index ebb71679260..dc3f632602e 100644 --- a/client/web/src/user/settings/emails/UserSettingsEmailsPage.tsx +++ b/client/web/src/user/settings/emails/UserSettingsEmailsPage.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames' import React, { FunctionComponent, useEffect, useState, useCallback } from 'react' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' -import { gql, dataOrThrowErrors } from '@sourcegraph/shared/src/graphql/graphql' +import { gql, dataOrThrowErrors } from '@sourcegraph/http-client' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' import { Container, PageHeader, LoadingSpinner } from '@sourcegraph/wildcard' diff --git a/client/web/src/user/settings/profile/EditUserProfileForm.tsx b/client/web/src/user/settings/profile/EditUserProfileForm.tsx index 3ba0eb4fe48..ca4feba1c90 100644 --- a/client/web/src/user/settings/profile/EditUserProfileForm.tsx +++ b/client/web/src/user/settings/profile/EditUserProfileForm.tsx @@ -2,8 +2,8 @@ import React, { useCallback, useState } from 'react' import { useHistory } from 'react-router' import { Form } from '@sourcegraph/branded/src/components/Form' -import { gql, useMutation } from '@sourcegraph/shared/src/graphql/graphql' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import { gql, useMutation } from '@sourcegraph/http-client' +import * as GQL from '@sourcegraph/shared/src/schema' import { Container, Button } from '@sourcegraph/wildcard' import { refreshAuthenticatedUser } from '../../../auth' diff --git a/client/web/src/user/settings/profile/UserProfileFormFields.tsx b/client/web/src/user/settings/profile/UserProfileFormFields.tsx index 6f12c71f665..4c37c34ada9 100644 --- a/client/web/src/user/settings/profile/UserProfileFormFields.tsx +++ b/client/web/src/user/settings/profile/UserProfileFormFields.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import React, { useCallback } from 'react' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { USER_DISPLAY_NAME_MAX_LENGTH } from '../..' import { UsernameInput } from '../../../auth/SignInSignUpCommon' diff --git a/client/web/src/user/settings/profile/UserSettingsProfilePage.test.tsx b/client/web/src/user/settings/profile/UserSettingsProfilePage.test.tsx index 579b6ef5d85..6cce16028d8 100644 --- a/client/web/src/user/settings/profile/UserSettingsProfilePage.test.tsx +++ b/client/web/src/user/settings/profile/UserSettingsProfilePage.test.tsx @@ -3,7 +3,7 @@ import { fireEvent, render, RenderResult, act } from '@testing-library/react' import React from 'react' import { MemoryRouter } from 'react-router' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' import { UPDATE_USER } from './EditUserProfileForm' diff --git a/client/web/src/user/settings/profile/UserSettingsProfilePage.tsx b/client/web/src/user/settings/profile/UserSettingsProfilePage.tsx index 708a0c13eee..2fb4292205c 100644 --- a/client/web/src/user/settings/profile/UserSettingsProfilePage.tsx +++ b/client/web/src/user/settings/profile/UserSettingsProfilePage.tsx @@ -1,8 +1,8 @@ import React, { useEffect } from 'react' +import { gql } from '@sourcegraph/http-client' import { percentageDone } from '@sourcegraph/shared/src/components/activation/Activation' import { ActivationChecklist } from '@sourcegraph/shared/src/components/activation/ActivationChecklist' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { Container, PageHeader } from '@sourcegraph/wildcard' import { PageTitle } from '../../../components/PageTitle' diff --git a/client/web/src/user/settings/repositories/SettingsRepositoriesPage.tsx b/client/web/src/user/settings/repositories/SettingsRepositoriesPage.tsx index b11680fdb27..46590f880b2 100644 --- a/client/web/src/user/settings/repositories/SettingsRepositoriesPage.tsx +++ b/client/web/src/user/settings/repositories/SettingsRepositoriesPage.tsx @@ -4,8 +4,8 @@ import { EMPTY, Observable } from 'rxjs' import { catchError, tap } from 'rxjs/operators' import { asError, ErrorLike, isErrorLike } from '@sourcegraph/common' +import { gql } from '@sourcegraph/http-client' import { Link } from '@sourcegraph/shared/src/components/Link' -import { gql } from '@sourcegraph/shared/src/graphql/graphql' import { TelemetryProps } from '@sourcegraph/shared/src/telemetry/telemetryService' import { repeatUntil } from '@sourcegraph/shared/src/util/rxjs/repeatUntil' import { useObservable } from '@sourcegraph/shared/src/util/useObservable' diff --git a/client/web/src/util/settings.ts b/client/web/src/util/settings.ts index 99484fba963..2a5e1758621 100644 --- a/client/web/src/util/settings.ts +++ b/client/web/src/util/settings.ts @@ -1,6 +1,6 @@ import { isErrorLike } from '@sourcegraph/common' import { SearchPatternType } from '@sourcegraph/shared/src/graphql-operations' -import * as GQL from '@sourcegraph/shared/src/graphql/schema' +import * as GQL from '@sourcegraph/shared/src/schema' import { SettingsCascadeOrError } from '@sourcegraph/shared/src/settings/settings' import { AuthenticatedUser } from '../auth' diff --git a/client/web/tsconfig.json b/client/web/tsconfig.json index 48148f8c7fd..78750bab5e3 100644 --- a/client/web/tsconfig.json +++ b/client/web/tsconfig.json @@ -15,6 +15,7 @@ { "path": "../branded" }, { "path": "../../schema" }, { "path": "../storybook" }, + { "path": "../http-client" }, { "path": "../codeintellify" }, { "path": "../common" }, ], diff --git a/dev/foreach-ts-project.sh b/dev/foreach-ts-project.sh index b372313e736..71811532d86 100755 --- a/dev/foreach-ts-project.sh +++ b/dev/foreach-ts-project.sh @@ -17,6 +17,7 @@ DIRS=( client/browser client/build-config client/common + client/http-client client/codeintellify client/wildcard client/template-parser diff --git a/doc/dev/background-information/web/graphql.md b/doc/dev/background-information/web/graphql.md index 177a51df04a..588d873eba9 100644 --- a/doc/dev/background-information/web/graphql.md +++ b/doc/dev/background-information/web/graphql.md @@ -20,7 +20,7 @@ Using a `useQuery` hook, we can easily fire a request and handle the response co ```ts // ./MyComponent.tsx -import { useQuery, gql } from '@sourcegraph/shared/src/graphql/graphql' +import { useQuery, gql } from '@sourcegraph/http-client' import { UserDisplayNameResult, UserDisplayNameVariables } from '../../graphql-operations' @@ -132,7 +132,7 @@ Apollo lets us easily mock queries in our tests without having to actually mock ```ts import { render } from '@testing-library/react' -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { MockedTestProvider } from '@sourcegraph/shared/src/testing/apollo' import { MyComponent, USER_DISPLAY_NAME } from './MyComponent' @@ -171,7 +171,7 @@ describe('My Test', () => { Most queries should be requested in the context of our UI and should use hooks. If there is a scenario where this is not possible, it is still possible to realise the benefits of Apollo without relying this approach. We can imperatively trigger any query using `client.query`. ```ts -import { getDocumentNode } from '@sourcegraph/shared/src/graphql/graphql' +import { getDocumentNode } from '@sourcegraph/http-client' import { client } from './backend/graphql' import { diff --git a/tsconfig.all.json b/tsconfig.all.json index 6186021093d..fae555ff415 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -6,6 +6,7 @@ { "path": "client/common" }, { "path": "client/shared" }, { "path": "client/shared/src/testing" }, + { "path": "client/http-client" }, { "path": "client/branded" }, { "path": "client/web" }, { "path": "client/wildcard" },