mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
[SG-28893] refactor: extract graphql folder into a new http-client package. (#29346)
Co-authored-by: gitstart-sourcegraph <gitstart@users.noreply.github.com>
This commit is contained in:
parent
369464f3d3
commit
e7e705c808
1
.github/workflows/lsif-ts.yml
vendored
1
.github/workflows/lsif-ts.yml
vendored
@ -24,6 +24,7 @@ jobs:
|
||||
- client/web
|
||||
- client/wildcard
|
||||
- client/common
|
||||
- client/http-client
|
||||
- client/codeintellify
|
||||
- client/template-parser
|
||||
steps:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -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
|
||||
|
||||
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -61,6 +61,7 @@
|
||||
"./client/browser",
|
||||
"./client/build-config",
|
||||
"./client/shared",
|
||||
"./client/http-client",
|
||||
"./client/branded",
|
||||
"./client/wildcard",
|
||||
"./client/storybook",
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
out/
|
||||
src/graphql/schema.ts
|
||||
src/schema.ts
|
||||
src/graphql-operations.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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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<GQL.ISite> =>
|
||||
requestGraphQL<GQL.IQuery>({
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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]: (
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { checkOk } from '@sourcegraph/shared/src/backend/fetch'
|
||||
import { checkOk } from '@sourcegraph/http-client'
|
||||
|
||||
import { isDefaultSourcegraphUrl } from '../util/context'
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
{ "path": "../shared" },
|
||||
{ "path": "../branded" },
|
||||
{ "path": "../../schema" },
|
||||
{ "path": "../http-client" },
|
||||
{ "path": "../common" },
|
||||
{ "path": "../codeintellify" },
|
||||
],
|
||||
|
||||
1
client/http-client/.eslintignore
Normal file
1
client/http-client/.eslintignore
Normal file
@ -0,0 +1 @@
|
||||
out/
|
||||
13
client/http-client/.eslintrc.js
Normal file
13
client/http-client/.eslintrc.js
Normal file
@ -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,
|
||||
}
|
||||
3
client/http-client/README.md
Normal file
3
client/http-client/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Http Client
|
||||
|
||||
Generic logic for sending and handling HTTP requests from our client applications.
|
||||
5
client/http-client/babel.config.js
Normal file
5
client/http-client/babel.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
// @ts-check
|
||||
|
||||
module.exports = {
|
||||
extends: '../../babel.config.js',
|
||||
}
|
||||
13
client/http-client/jest.config.js
Normal file
13
client/http-client/jest.config.js
Normal file
@ -0,0 +1,13 @@
|
||||
// @ts-check
|
||||
|
||||
const config = require('../../jest.config.base')
|
||||
|
||||
const exportedConfig = {
|
||||
...config,
|
||||
displayName: 'http-client',
|
||||
rootDir: __dirname,
|
||||
roots: ['<rootDir>'],
|
||||
verbose: true,
|
||||
}
|
||||
|
||||
module.exports = exportedConfig
|
||||
13
client/http-client/package.json
Normal file
13
client/http-client/package.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
@ -1,3 +1,5 @@
|
||||
export * from './fromObservableQuery'
|
||||
export * from './client'
|
||||
export * from './hooks'
|
||||
export * from './persistenceMapper'
|
||||
export * from './cache'
|
||||
@ -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.
|
||||
@ -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'
|
||||
|
||||
1
client/http-client/src/graphql/links/index.ts
Normal file
1
client/http-client/src/graphql/links/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './concurrent-requests-link'
|
||||
5
client/http-client/src/index.ts
Normal file
5
client/http-client/src/index.ts
Normal file
@ -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'
|
||||
12
client/http-client/tsconfig.json
Normal file
12
client/http-client/tsconfig.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"sourceRoot": "src",
|
||||
"rootDir": ".",
|
||||
"outDir": "./out",
|
||||
"baseUrl": "./src",
|
||||
},
|
||||
"include": ["./src/**/*", "./*.ts"],
|
||||
"references": [{ "path": "../common" }],
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
out/
|
||||
src/graphql/schema.ts
|
||||
src/schema.ts
|
||||
src/graphql-operations.ts
|
||||
|
||||
@ -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 = [
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { SearchPatternType } from 'src/graphql-operations'
|
||||
import { SearchPatternType } from '../../graphql-operations'
|
||||
|
||||
import {
|
||||
AliasedFilterType,
|
||||
|
||||
@ -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[] }
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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'
|
||||
|
||||
/**
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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<MockedProviderProps> = ({ children, ...props }) => {
|
||||
/**
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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" }],
|
||||
}
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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"],
|
||||
}
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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!) {
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user