Returns a Boolean!
Returns [AutocompleteMemberSearchItem!]!
query autocompleteMembersSearch(
$organization: ID!,
$query: String!
) {
autocompleteMembersSearch(
organization: $organization,
query: $query
) {
id
username
displayName
avatarURL
inOrg
}
}
Returns a BackgroundJobConnection!
query backgroundJobs(
$first: Int,
$after: String,
$recentRunCount: Int
) {
backgroundJobs(
first: $first,
after: $after,
recentRunCount: $recentRunCount
) {
nodes {
...BackgroundJobFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns a ClientConfigurationDetails!
Returns a User
query currentUser {
currentUser {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
username
email
displayName
avatarURL
url
settingsURL
createdAt
updatedAt
siteAdmin
builtinAuth
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
organizations {
...OrgConnectionFragment
}
organizationMemberships {
...OrganizationMembershipConnectionFragment
}
tags
tosAccepted
searchable
usageStatistics {
...UserUsageStatisticsFragment
}
eventLogs {
...EventLogsConnectionFragment
}
emails {
...UserEmailFragment
}
accessTokens {
...AccessTokenConnectionFragment
}
externalAccounts {
...ExternalAccountConnectionFragment
}
session {
...SessionFragment
}
viewerCanAdminister
viewerCanChangeUsername
surveyResponses {
...SurveyResponseFragment
}
databaseID
namespaceName
invitableCollaborators {
...PersonFragment
}
teams {
...TeamConnectionFragment
}
}
}
{
"data": {
"currentUser": {
"executorSecrets": ExecutorSecretConnection,
"id": "4",
"username": "xyz789",
"email": "xyz789",
"displayName": "xyz789",
"avatarURL": "xyz789",
"url": "xyz789",
"settingsURL": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"siteAdmin": false,
"builtinAuth": false,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"organizations": OrgConnection,
"organizationMemberships": OrganizationMembershipConnection,
"tags": ["abc123"],
"tosAccepted": true,
"searchable": false,
"usageStatistics": UserUsageStatistics,
"eventLogs": EventLogsConnection,
"emails": [UserEmail],
"accessTokens": AccessTokenConnection,
"externalAccounts": ExternalAccountConnection,
"session": Session,
"viewerCanAdminister": false,
"viewerCanChangeUsername": true,
"surveyResponses": [SurveyResponse],
"databaseID": 987,
"namespaceName": "abc123",
"invitableCollaborators": [Person],
"teams": TeamConnection
}
}
}
Returns [EvaluatedFeatureFlag!]!
Returns an ExecutorSecretConnection!
Name | Description |
---|---|
scope - ExecutorSecretScope!
|
The scope for which secrets shall be returned. |
first - Int
|
Only return N records. Default = 50 |
after - String
|
Opaque cursor for pagination. |
query executorSecrets(
$scope: ExecutorSecretScope!,
$first: Int,
$after: String
) {
executorSecrets(
scope: $scope,
first: $first,
after: $after
) {
nodes {
...ExecutorSecretFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns an ExecutorConnection!
Name | Description |
---|---|
query - String
|
An (optional) search query that searches over the hostname, queue name, os, architecture, and version properties. |
active - Boolean
|
Whether to show only executors that have sent a heartbeat in the last fifteen minutes. |
first - Int
|
Returns the first n executors. Default = 50 |
after - String
|
Opaque pagination cursor. |
query executors(
$query: String,
$active: Boolean,
$first: Int,
$after: String
) {
executors(
query: $query,
active: $active,
first: $first,
after: $after
) {
nodes {
...ExecutorFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns an ExtensionRegistry!
Returns an ExternalServiceNamespaceConnection!
Name | Description |
---|---|
kind - ExternalServiceKind!
|
The kind of the external service. |
token - String!
|
The secret token value that is used to authenticate. |
url - String!
|
The url of the external service. |
query externalServiceNamespaces(
$kind: ExternalServiceKind!,
$token: String!,
$url: String!
) {
externalServiceNamespaces(
kind: $kind,
token: $token,
url: $url
) {
nodes {
...ExternalServiceNamespaceFragment
}
totalCount
}
}
Returns an ExternalServiceConnection!
query externalServices(
$first: Int,
$after: String
) {
externalServices(
first: $first,
after: $after
) {
nodes {
...ExternalServiceFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns a FeatureFlag!
Name | Description |
---|---|
name - String!
|
Returns [FeatureFlag!]!
Returns a String!
query highlightCode(
$code: String!,
$fuzzyLanguage: String!,
$disableTimeout: Boolean!
) {
highlightCode(
code: $code,
fuzzyLanguage: $fuzzyLanguage,
disableTimeout: $disableTimeout
)
}
Returns an OrganizationInvitation!
Name | Description |
---|---|
token - String!
|
The token that uniquely identifies the invitation |
query invitationByToken($token: String!) {
invitationByToken(token: $token) {
id
organization {
...OrgFragment
}
sender {
...UserFragment
}
recipient {
...UserFragment
}
recipientEmail
createdAt
notifiedAt
respondedAt
responseType
respondURL
revokedAt
expiresAt
isVerifiedEmail
}
}
{
"data": {
"invitationByToken": {
"id": "4",
"organization": Org,
"sender": User,
"recipient": User,
"recipientEmail": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"notifiedAt": "2007-12-03T10:15:30Z",
"respondedAt": "2007-12-03T10:15:30Z",
"responseType": "ACCEPT",
"respondURL": "xyz789",
"revokedAt": "2007-12-03T10:15:30Z",
"expiresAt": "2007-12-03T10:15:30Z",
"isVerifiedEmail": false
}
}
}
Returns an OrgMembersSummary!
Name | Description |
---|---|
organization - ID!
|
The organization ID |
query organization($name: String!) {
organization(name: $name) {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
name
displayName
createdAt
members {
...NewUsersConnectionFragment
}
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
viewerPendingInvitation {
...OrganizationInvitationFragment
}
viewerCanAdminister
viewerIsMember
url
settingsURL
namespaceName
}
}
{
"data": {
"organization": {
"executorSecrets": ExecutorSecretConnection,
"id": 4,
"name": "xyz789",
"displayName": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"members": NewUsersConnection,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"viewerPendingInvitation": OrganizationInvitation,
"viewerCanAdminister": false,
"viewerIsMember": true,
"url": "abc123",
"settingsURL": "xyz789",
"namespaceName": "xyz789"
}
}
}
Returns [FeatureFlagOverride!]!
query organizationFeatureFlagOverrides {
organizationFeatureFlagOverrides {
id
namespace {
...NamespaceFragment
}
targetFlag {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
value
}
}
Returns an OrgConnection!
Returns [OutOfBandMigration!]!
query outOfBandMigrations {
outOfBandMigrations {
id
team
component
description
introduced
deprecated
progress
created
lastUpdated
nonDestructive
applyReverse
errors {
...OutOfBandMigrationErrorFragment
}
}
}
{
"data": {
"outOfBandMigrations": [
{
"id": 4,
"team": "xyz789",
"component": "abc123",
"description": "xyz789",
"introduced": "abc123",
"deprecated": "abc123",
"progress": 123.45,
"created": "2007-12-03T10:15:30Z",
"lastUpdated": "2007-12-03T10:15:30Z",
"nonDestructive": false,
"applyReverse": true,
"errors": [OutOfBandMigrationError]
}
]
}
}
Returns an OutboundRequestConnection!
query outboundRequests(
$first: Int,
$after: String
) {
outboundRequests(
first: $first,
after: $after
) {
nodes {
...OutboundRequestFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns a PackageRepoReferenceConnection!
Name | Description |
---|---|
scheme - PackageRepoReferenceKind
|
The exact scheme value to filter by. |
name - String
|
If supplied, only package repo references that match the given terms by their name will be returned. TODO: fuzzy vs exact? |
first - Int
|
Returns the first n external services from the list. |
after - String
|
Opaque pagination cursor. |
query packageRepoReferences(
$scheme: PackageRepoReferenceKind,
$name: String,
$first: Int,
$after: String
) {
packageRepoReferences(
scheme: $scheme,
name: $name,
first: $first,
after: $after
) {
nodes {
...PackageRepoReferenceFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns a String!
Name | Description |
---|---|
query - String
|
The search query (such as "repo:myrepo foo"). Default = "" |
patternType - SearchPatternType
|
The parser to use for this query. Default = standard |
outputPhase - SearchQueryOutputPhase
|
The output corresponding to a phase in the parser pipeline. Default = PARSE_TREE |
outputFormat - SearchQueryOutputFormat
|
The parser output format. Default = JSON |
outputVerbosity - SearchQueryOutputVerbosity
|
The level of output format verbosity. Default = BASIC |
query parseSearchQuery(
$query: String,
$patternType: SearchPatternType,
$outputPhase: SearchQueryOutputPhase,
$outputFormat: SearchQueryOutputFormat,
$outputVerbosity: SearchQueryOutputVerbosity
) {
parseSearchQuery(
query: $query,
patternType: $patternType,
outputPhase: $outputPhase,
outputFormat: $outputFormat,
outputVerbosity: $outputVerbosity
)
}
{
"query": "",
"patternType": "standard",
"outputPhase": "PARSE_TREE",
"outputFormat": "JSON",
"outputVerbosity": "BASIC"
}
Returns [OrganizationInvitation!]!
Name | Description |
---|---|
organization - ID!
|
The organization ID |
query pendingInvitations($organization: ID!) {
pendingInvitations(organization: $organization) {
id
organization {
...OrgFragment
}
sender {
...UserFragment
}
recipient {
...UserFragment
}
recipientEmail
createdAt
notifiedAt
respondedAt
responseType
respondURL
revokedAt
expiresAt
isVerifiedEmail
}
}
{
"data": {
"pendingInvitations": [
{
"id": "4",
"organization": Org,
"sender": User,
"recipient": User,
"recipientEmail": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"notifiedAt": "2007-12-03T10:15:30Z",
"respondedAt": "2007-12-03T10:15:30Z",
"responseType": "ACCEPT",
"respondURL": "abc123",
"revokedAt": "2007-12-03T10:15:30Z",
"expiresAt": "2007-12-03T10:15:30Z",
"isVerifiedEmail": false
}
]
}
}
Returns a PhabricatorRepo
query phabricatorRepo(
$name: String,
$uri: String
) {
phabricatorRepo(
name: $name,
uri: $uri
) {
name
uri
callsign
url
}
}
Returns a String!
Name | Description |
---|---|
markdown - String!
|
|
options - MarkdownOptions
|
Returns a NewRepositoryConnection!
Name | Description |
---|---|
first - Int
|
Returns the first n repositories from the list. |
last - Int
|
Returns the last n repositories from the list. |
query - String
|
Return repositories whose names match the query. |
after - String
|
An opaque cursor that is used for pagination. |
before - String
|
An opaque cursor that is used for pagination. |
names - [String!]
|
Return repositories whose names are in the list. |
cloned - Boolean
|
Include cloned repositories. Default = true |
cloneStatus - CloneStatus
|
Include only repositories of the given clone status. |
notCloned - Boolean
|
Include repositories that are not yet cloned and for which cloning is not in progress. Default = true |
indexed - Boolean
|
Include repositories that have a text search index. Default = true |
notIndexed - Boolean
|
Include repositories that do not have a text search index. Default = true |
failedFetch - Boolean
|
Include only repositories that have encountered errors when cloning or fetching. Default = false |
corrupted - Boolean
|
Include repositories that are corrupt. Default = false |
externalService - ID
|
Return repositories that are associated with the given external service. |
orderBy - RepositoryOrderBy
|
Sort field. Default = REPOSITORY_NAME |
descending - Boolean
|
Sort direction. Default = false |
query repositories(
$first: Int,
$last: Int,
$query: String,
$after: String,
$before: String,
$names: [String!],
$cloned: Boolean,
$cloneStatus: CloneStatus,
$notCloned: Boolean,
$indexed: Boolean,
$notIndexed: Boolean,
$failedFetch: Boolean,
$corrupted: Boolean,
$externalService: ID,
$orderBy: RepositoryOrderBy,
$descending: Boolean
) {
repositories(
first: $first,
last: $last,
query: $query,
after: $after,
before: $before,
names: $names,
cloned: $cloned,
cloneStatus: $cloneStatus,
notCloned: $notCloned,
indexed: $indexed,
notIndexed: $notIndexed,
failedFetch: $failedFetch,
corrupted: $corrupted,
externalService: $externalService,
orderBy: $orderBy,
descending: $descending
) {
nodes {
...RepositoryFragment
}
totalCount
pageInfo {
...ConnectionPageInfoFragment
}
}
}
{
"first": 987,
"last": 987,
"query": "xyz789",
"after": "xyz789",
"before": "xyz789",
"names": ["abc123"],
"cloned": true,
"cloneStatus": "NOT_CLONED",
"notCloned": true,
"indexed": true,
"notIndexed": true,
"failedFetch": false,
"corrupted": false,
"externalService": 4,
"orderBy": "REPOSITORY_NAME",
"descending": false
}
Returns a Repository
Name | Description |
---|---|
name - String
|
Query the repository by name, for example "github.com/gorilla/mux". |
cloneURL - String
|
Query the repository by a Git clone URL (format documented here: https://git-scm.com/docs/git-clone_git_urls_a_id_urls_a) by checking for a code host configuration that matches the clone URL. Will not actually check the code host to see if the repository actually exists. |
uri - String
|
An alias for name. DEPRECATED: use name instead. |
query repository(
$name: String,
$cloneURL: String,
$uri: String
) {
repository(
name: $name,
cloneURL: $cloneURL,
uri: $uri
) {
id
name
uri
description
language
createdAt
updatedAt
commit {
...GitCommitFragment
}
firstEverCommit {
...GitCommitFragment
}
mirrorInfo {
...MirrorRepositoryInfoFragment
}
externalRepository {
...ExternalRepositoryFragment
}
isFork
isArchived
isPrivate
externalServices {
...ExternalServiceConnectionFragment
}
cloneInProgress
textSearchIndex {
...RepositoryTextSearchIndexFragment
}
url
externalURLs {
...ExternalLinkFragment
}
defaultBranch {
...GitRefFragment
}
gitRefs {
...GitRefConnectionFragment
}
branches {
...GitRefConnectionFragment
}
tags {
...GitRefConnectionFragment
}
comparison {
...RepositoryComparisonFragment
}
contributors {
...RepositoryContributorConnectionFragment
}
viewerCanAdminister
label {
...MarkdownFragment
}
detail {
...MarkdownFragment
}
matches {
...SearchResultMatchFragment
}
codeIntelligenceCommitGraph {
...CodeIntelligenceCommitGraphFragment
}
stars
keyValuePairs {
...KeyValuePairFragment
}
diskSizeBytes
}
}
{
"data": {
"repository": {
"id": "4",
"name": "xyz789",
"uri": "abc123",
"description": "abc123",
"language": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"commit": GitCommit,
"firstEverCommit": GitCommit,
"mirrorInfo": MirrorRepositoryInfo,
"externalRepository": ExternalRepository,
"isFork": true,
"isArchived": true,
"isPrivate": true,
"externalServices": ExternalServiceConnection,
"cloneInProgress": true,
"textSearchIndex": RepositoryTextSearchIndex,
"url": "abc123",
"externalURLs": [ExternalLink],
"defaultBranch": GitRef,
"gitRefs": GitRefConnection,
"branches": GitRefConnection,
"tags": GitRefConnection,
"comparison": RepositoryComparison,
"contributors": RepositoryContributorConnection,
"viewerCanAdminister": true,
"label": Markdown,
"detail": Markdown,
"matches": [SearchResultMatch],
"codeIntelligenceCommitGraph": CodeIntelligenceCommitGraph,
"stars": 987,
"keyValuePairs": [KeyValuePair],
"diskSizeBytes": {}
}
}
}
Looks up a repository by either name or cloneURL or hashedName. When the repository does not exist on the server and "disablePublicRepoRedirects" is "false" in the site configuration, it returns a Redirect to an external Sourcegraph URL that may have this repository instead. Otherwise, this query returns null.
Returns a RepositoryRedirect
Name | Description |
---|---|
name - String
|
Query the repository by name, for example "github.com/gorilla/mux". |
cloneURL - String
|
Query the repository by a Git clone URL (format documented here: https://git-scm.com/docs/git-clone_git_urls_a_id_urls_a) by checking for a code host configuration that matches the clone URL. Will not actually check the code host to see if the repository actually exists. |
hashedName - String
|
Query the repository by hashed name. Hashed name is a SHA256 checksum of the absolute repo name in lower case, for example "github.com/sourcegraph/sourcegraph" -> "a6c905ceb7dec9a565945ceded8c7fa4154250df8b928fb40673b535d9a24c2f" |
query repositoryRedirect(
$name: String,
$cloneURL: String,
$hashedName: String
) {
repositoryRedirect(
name: $name,
cloneURL: $cloneURL,
hashedName: $hashedName
) {
... on Repository {
...RepositoryFragment
}
... on Redirect {
...RedirectFragment
}
}
}
Returns a RepositoryStats!
query repositoryStats {
repositoryStats {
gitDirBytes
indexedLinesCount
total
cloned
cloning
notCloned
failedFetch
indexed
corrupted
}
}
Returns a Query!
query root {
root {
root {
...QueryFragment
}
node {
...NodeFragment
}
repository {
...RepositoryFragment
}
repositoryRedirect {
... on Repository {
...RepositoryFragment
}
... on Redirect {
...RedirectFragment
}
}
externalServices {
...ExternalServiceConnectionFragment
}
externalServiceNamespaces {
...ExternalServiceNamespaceConnectionFragment
}
repositories {
...NewRepositoryConnectionFragment
}
packageRepoReferences {
...PackageRepoReferenceConnectionFragment
}
phabricatorRepo {
...PhabricatorRepoFragment
}
currentUser {
...UserFragment
}
user {
...UserFragment
}
users {
...UserConnectionFragment
}
organization {
...OrgFragment
}
organizations {
...OrgConnectionFragment
}
renderMarkdown
highlightCode
settingsSubject {
...SettingsSubjectFragment
}
viewerSettings {
...SettingsCascadeFragment
}
viewerConfiguration {
...ConfigurationCascadeFragment
}
clientConfiguration {
...ClientConfigurationDetailsFragment
}
search {
...SearchFragment
}
savedSearches {
...SavedSearchesConnectionFragment
}
parseSearchQuery
site {
...SiteFragment
}
surveyResponses {
...SurveyResponseConnectionFragment
}
extensionRegistry {
...ExtensionRegistryFragment
}
statusMessages {
... on GitUpdatesDisabled {
...GitUpdatesDisabledFragment
}
... on CloningProgress {
...CloningProgressFragment
}
... on ExternalServiceSyncError {
...ExternalServiceSyncErrorFragment
}
... on SyncError {
...SyncErrorFragment
}
... on IndexingProgress {
...IndexingProgressFragment
}
}
repositoryStats {
...RepositoryStatsFragment
}
namespace {
...NamespaceFragment
}
namespaceByName {
...NamespaceFragment
}
codeHostSyncDue
outOfBandMigrations {
...OutOfBandMigrationFragment
}
featureFlags {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
featureFlag {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
evaluateFeatureFlag
evaluatedFeatureFlags {
...EvaluatedFeatureFlagFragment
}
organizationFeatureFlagValue
organizationFeatureFlagOverrides {
...FeatureFlagOverrideFragment
}
temporarySettings {
...TemporarySettingsFragment
}
webhookLogs {
...WebhookLogConnectionFragment
}
outboundRequests {
...OutboundRequestConnectionFragment
}
backgroundJobs {
...BackgroundJobConnectionFragment
}
invitationByToken {
...OrganizationInvitationFragment
}
pendingInvitations {
...OrganizationInvitationFragment
}
autocompleteMembersSearch {
...AutocompleteMemberSearchItemFragment
}
orgMembersSummary {
...OrgMembersSummaryFragment
}
webhooks {
...WebhookConnectionFragment
}
slowRequests {
...SlowRequestConnectionFragment
}
executorSecrets {
...ExecutorSecretConnectionFragment
}
executors {
...ExecutorConnectionFragment
}
areExecutorsConfigured
team {
...TeamFragment
}
teams {
...TeamConnectionFragment
}
}
}
{
"data": {
"root": {
"root": Query,
"node": Node,
"repository": Repository,
"repositoryRedirect": Repository,
"externalServices": ExternalServiceConnection,
"externalServiceNamespaces": ExternalServiceNamespaceConnection,
"repositories": NewRepositoryConnection,
"packageRepoReferences": PackageRepoReferenceConnection,
"phabricatorRepo": PhabricatorRepo,
"currentUser": User,
"user": User,
"users": UserConnection,
"organization": Org,
"organizations": OrgConnection,
"renderMarkdown": "xyz789",
"highlightCode": "xyz789",
"settingsSubject": SettingsSubject,
"viewerSettings": SettingsCascade,
"viewerConfiguration": ConfigurationCascade,
"clientConfiguration": ClientConfigurationDetails,
"search": Search,
"savedSearches": SavedSearchesConnection,
"parseSearchQuery": "xyz789",
"site": Site,
"surveyResponses": SurveyResponseConnection,
"extensionRegistry": ExtensionRegistry,
"statusMessages": [GitUpdatesDisabled],
"repositoryStats": RepositoryStats,
"namespace": Namespace,
"namespaceByName": Namespace,
"codeHostSyncDue": true,
"outOfBandMigrations": [OutOfBandMigration],
"featureFlags": [FeatureFlagBoolean],
"featureFlag": FeatureFlagBoolean,
"evaluateFeatureFlag": true,
"evaluatedFeatureFlags": [EvaluatedFeatureFlag],
"organizationFeatureFlagValue": true,
"organizationFeatureFlagOverrides": [
FeatureFlagOverride
],
"temporarySettings": TemporarySettings,
"webhookLogs": WebhookLogConnection,
"outboundRequests": OutboundRequestConnection,
"backgroundJobs": BackgroundJobConnection,
"invitationByToken": OrganizationInvitation,
"pendingInvitations": [OrganizationInvitation],
"autocompleteMembersSearch": [
AutocompleteMemberSearchItem
],
"orgMembersSummary": OrgMembersSummary,
"webhooks": WebhookConnection,
"slowRequests": SlowRequestConnection,
"executorSecrets": ExecutorSecretConnection,
"executors": ExecutorConnection,
"areExecutorsConfigured": false,
"team": Team,
"teams": TeamConnection
}
}
}
Returns a SavedSearchesConnection!
Name | Description |
---|---|
namespace - ID!
|
The namespace to list the saved searches for. |
first - Int
|
The limit argument for forward pagination. |
last - Int
|
The limit argument for backward pagination. |
after - String
|
The cursor argument for forward pagination. |
before - String
|
The cursor argument for backward pagination. |
query savedSearches(
$namespace: ID!,
$first: Int,
$last: Int,
$after: String,
$before: String
) {
savedSearches(
namespace: $namespace,
first: $first,
last: $last,
after: $after,
before: $before
) {
nodes {
...SavedSearchFragment
}
totalCount
pageInfo {
...ConnectionPageInfoFragment
}
}
}
Returns a Search
Name | Description |
---|---|
version - SearchVersion
|
The version of the search syntax being used. All new clients should use the latest version. Default = V1 |
patternType - SearchPatternType
|
PatternType controls the search pattern type, if and only if it is not specified in the query string using the patternType: field. |
query - String
|
The search query (such as "foo" or "repo:myrepo foo"). Default = "" |
query search(
$version: SearchVersion,
$patternType: SearchPatternType,
$query: String
) {
search(
version: $version,
patternType: $patternType,
query: $query
) {
results {
...SearchResultsFragment
}
stats {
...SearchResultsStatsFragment
}
}
}
Returns a SettingsSubject
Name | Description |
---|---|
id - ID!
|
query settingsSubject($id: ID!) {
settingsSubject(id: $id) {
id
latestSettings {
...SettingsFragment
}
settingsURL
viewerCanAdminister
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
}
}
Returns a Site!
query site {
site {
id
siteID
configuration {
...SiteConfigurationFragment
}
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
settingsURL
canReloadSite
viewerCanAdminister
accessTokens {
...AccessTokenConnectionFragment
}
authProviders {
...AuthProviderConnectionFragment
}
externalAccounts {
...ExternalAccountConnectionFragment
}
buildVersion
productVersion
updateCheck {
...UpdateCheckFragment
}
needsRepositoryConfiguration
externalServicesFromFile
allowEditExternalServicesWithFile
freeUsersExceeded
alerts {
...AlertFragment
}
hasCodeIntelligence
sendsEmailVerificationEmails
productSubscription {
...ProductSubscriptionStatusFragment
}
usageStatistics {
...SiteUsageStatisticsFragment
}
analytics {
...AnalyticsFragment
}
users {
...SiteUsersFragment
}
monitoringStatistics {
...MonitoringStatisticsFragment
}
allowSiteSettingsEdits
enableLegacyExtensions
upgradeReadiness {
...UpgradeReadinessFragment
}
}
}
{
"data": {
"site": {
"id": 4,
"siteID": "abc123",
"configuration": SiteConfiguration,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"settingsURL": "abc123",
"canReloadSite": true,
"viewerCanAdminister": false,
"accessTokens": AccessTokenConnection,
"authProviders": AuthProviderConnection,
"externalAccounts": ExternalAccountConnection,
"buildVersion": "xyz789",
"productVersion": "abc123",
"updateCheck": UpdateCheck,
"needsRepositoryConfiguration": true,
"externalServicesFromFile": false,
"allowEditExternalServicesWithFile": true,
"freeUsersExceeded": true,
"alerts": [Alert],
"hasCodeIntelligence": false,
"sendsEmailVerificationEmails": true,
"productSubscription": ProductSubscriptionStatus,
"usageStatistics": SiteUsageStatistics,
"analytics": Analytics,
"users": SiteUsers,
"monitoringStatistics": MonitoringStatistics,
"allowSiteSettingsEdits": true,
"enableLegacyExtensions": false,
"upgradeReadiness": UpgradeReadiness
}
}
}
Returns a SlowRequestConnection!
Name | Description |
---|---|
after - String
|
Opaque pagnination cursor. |
query slowRequests($after: String) {
slowRequests(after: $after) {
nodes {
...SlowRequestFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns [StatusMessage!]!
query statusMessages {
statusMessages {
... on GitUpdatesDisabled {
...GitUpdatesDisabledFragment
}
... on CloningProgress {
...CloningProgressFragment
}
... on ExternalServiceSyncError {
...ExternalServiceSyncErrorFragment
}
... on SyncError {
...SyncErrorFragment
}
... on IndexingProgress {
...IndexingProgressFragment
}
}
}
Returns a SurveyResponseConnection!
Name | Description |
---|---|
first - Int
|
Returns the first n survey responses from the list. |
query surveyResponses($first: Int) {
surveyResponses(first: $first) {
nodes {
...SurveyResponseFragment
}
totalCount
last30DaysCount
averageScore
netPromoterScore
}
}
query team($name: String!) {
team(name: $name) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
Returns a TeamConnection!
query teams(
$first: Int,
$after: String,
$search: String
) {
teams(
first: $first,
after: $after,
search: $search
) {
totalCount
pageInfo {
...PageInfoFragment
}
nodes {
...TeamFragment
}
}
}
Returns a TemporarySettings!
Returns a User
query user(
$username: String,
$email: String
) {
user(
username: $username,
email: $email
) {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
username
email
displayName
avatarURL
url
settingsURL
createdAt
updatedAt
siteAdmin
builtinAuth
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
organizations {
...OrgConnectionFragment
}
organizationMemberships {
...OrganizationMembershipConnectionFragment
}
tags
tosAccepted
searchable
usageStatistics {
...UserUsageStatisticsFragment
}
eventLogs {
...EventLogsConnectionFragment
}
emails {
...UserEmailFragment
}
accessTokens {
...AccessTokenConnectionFragment
}
externalAccounts {
...ExternalAccountConnectionFragment
}
session {
...SessionFragment
}
viewerCanAdminister
viewerCanChangeUsername
surveyResponses {
...SurveyResponseFragment
}
databaseID
namespaceName
invitableCollaborators {
...PersonFragment
}
teams {
...TeamConnectionFragment
}
}
}
{
"data": {
"user": {
"executorSecrets": ExecutorSecretConnection,
"id": 4,
"username": "abc123",
"email": "xyz789",
"displayName": "abc123",
"avatarURL": "abc123",
"url": "abc123",
"settingsURL": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"siteAdmin": false,
"builtinAuth": false,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"organizations": OrgConnection,
"organizationMemberships": OrganizationMembershipConnection,
"tags": ["xyz789"],
"tosAccepted": true,
"searchable": false,
"usageStatistics": UserUsageStatistics,
"eventLogs": EventLogsConnection,
"emails": [UserEmail],
"accessTokens": AccessTokenConnection,
"externalAccounts": ExternalAccountConnection,
"session": Session,
"viewerCanAdminister": true,
"viewerCanChangeUsername": true,
"surveyResponses": [SurveyResponse],
"databaseID": 987,
"namespaceName": "abc123",
"invitableCollaborators": [Person],
"teams": TeamConnection
}
}
}
Returns a UserConnection!
Name | Description |
---|---|
first - Int
|
Returns the first n users from the list. |
after - String
|
Opaque pagination cursor. |
query - String
|
Return users whose usernames or display names match the query. |
tag - String
|
Return only users with the given tag. |
activePeriod - UserActivePeriod
|
Returns users who have been active in a given period of time. |
inactiveSince - DateTime
|
Returns users who have NOT been active since a given point in time. |
query users(
$first: Int,
$after: String,
$query: String,
$tag: String,
$activePeriod: UserActivePeriod,
$inactiveSince: DateTime
) {
users(
first: $first,
after: $after,
query: $query,
tag: $tag,
activePeriod: $activePeriod,
inactiveSince: $inactiveSince
) {
nodes {
...UserFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
{
"first": 987,
"after": "abc123",
"query": "xyz789",
"tag": "xyz789",
"activePeriod": "TODAY",
"inactiveSince": "2007-12-03T10:15:30Z"
}
Returns a ConfigurationCascade!
Returns a SettingsCascade!
Returns a WebhookLogConnection!
Name | Description |
---|---|
first - Int
|
Returns the first n webhook logs. |
after - String
|
Opaque pagination cursor. |
onlyErrors - Boolean
|
Only include webhook logs that resulted in errors. |
onlyUnmatched - Boolean
|
Only include webhook logs that were not matched to an external service. |
since - DateTime
|
Only include webhook logs on or after this time. |
until - DateTime
|
Only include webhook logs on or before this time. |
webhookID - ID
|
Only include webhook logs of given webhook ID. |
legacyOnly - Boolean
|
Only include webhook logs that have no webhook ID set. |
query webhookLogs(
$first: Int,
$after: String,
$onlyErrors: Boolean,
$onlyUnmatched: Boolean,
$since: DateTime,
$until: DateTime,
$webhookID: ID,
$legacyOnly: Boolean
) {
webhookLogs(
first: $first,
after: $after,
onlyErrors: $onlyErrors,
onlyUnmatched: $onlyUnmatched,
since: $since,
until: $until,
webhookID: $webhookID,
legacyOnly: $legacyOnly
) {
nodes {
...WebhookLogFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
{
"first": 123,
"after": "abc123",
"onlyErrors": false,
"onlyUnmatched": false,
"since": "2007-12-03T10:15:30Z",
"until": "2007-12-03T10:15:30Z",
"webhookID": "4",
"legacyOnly": true
}
Returns a WebhookConnection!
Name | Description |
---|---|
first - Int
|
Returns the first n webhooks from the list. |
after - String
|
Opaque pagination cursor. |
kind - ExternalServiceKind
|
Optionally filter by kind. |
query webhooks(
$first: Int,
$after: String,
$kind: ExternalServiceKind
) {
webhooks(
first: $first,
after: $after,
kind: $kind
) {
nodes {
...WebhookFragment
}
totalCount
pageInfo {
...PageInfoFragment
}
}
}
Returns an EmptyResponse!
mutation addExternalAccount(
$serviceType: String!,
$serviceID: String!,
$accountDetails: String!
) {
addExternalAccount(
serviceType: $serviceType,
serviceID: $serviceID,
accountDetails: $accountDetails
) {
alwaysNil
}
}
Returns an ExternalService!
Name | Description |
---|---|
input - AddExternalServiceInput!
|
mutation addExternalService($input: AddExternalServiceInput!) {
addExternalService(input: $input) {
id
kind
displayName
config
createdAt
updatedAt
repoCount
webhookURL
warning
lastSyncError
lastSyncAt
nextSyncAt
webhookLogs {
...WebhookLogConnectionFragment
}
syncJobs {
...ExternalServiceSyncJobConnectionFragment
}
checkConnection {
... on ExternalServiceAvailable {
...ExternalServiceAvailableFragment
}
... on ExternalServiceUnavailable {
...ExternalServiceUnavailableFragment
}
... on ExternalServiceAvailabilityUnknown {
...ExternalServiceAvailabilityUnknownFragment
}
}
hasConnectionCheck
supportsRepoExclusion
}
}
{
"data": {
"addExternalService": {
"id": "4",
"kind": "AWSCODECOMMIT",
"displayName": "abc123",
"config": JSONCString,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"repoCount": 987,
"webhookURL": "abc123",
"warning": "xyz789",
"lastSyncError": "abc123",
"lastSyncAt": "2007-12-03T10:15:30Z",
"nextSyncAt": "2007-12-03T10:15:30Z",
"webhookLogs": WebhookLogConnection,
"syncJobs": ExternalServiceSyncJobConnection,
"checkConnection": ExternalServiceAvailable,
"hasConnectionCheck": false,
"supportsRepoExclusion": false
}
}
}
Returns an EmptyResponse
Name | Description |
---|---|
callsign - String!
|
The callsign, for example "MUX". |
name - String
|
The name, for example "github.com/gorilla/mux". |
uri - String
|
An alias for name. DEPRECATED: use name instead. |
url - String!
|
The URL to the phabricator instance (e.g. http://phabricator.sgdev.org). |
mutation addPhabricatorRepo(
$callsign: String!,
$name: String,
$uri: String,
$url: String!
) {
addPhabricatorRepo(
callsign: $callsign,
name: $name,
uri: $uri,
url: $url
) {
alwaysNil
}
}
Returns an EmptyResponse!
mutation addRepoKeyValuePair(
$repo: ID!,
$key: String!,
$value: String
) {
addRepoKeyValuePair(
repo: $repo,
key: $key,
value: $value
) {
alwaysNil
}
}
Add a list of team members to an existing team. People that already are part of the team are ignored.
Either team XOR teamName can be specified to specify the team. Must be team member to add new team members, or site-admin.
For now, members can only be the IDs of User entities in Sourcegraph. Later, we will expand this to allow Persons as well.
mutation addTeamMembers(
$team: ID,
$teamName: String,
$members: [ID!]!
) {
addTeamMembers(
team: $team,
teamName: $teamName,
members: $members
) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
Returns an EmptyResponse!
Returns an EmptyResponse!
mutation addUserToOrganization(
$organization: ID!,
$username: String!
) {
addUserToOrganization(
organization: $organization,
username: $username
) {
alwaysNil
}
}
Returns an EmptyResponse!
Name | Description |
---|---|
id - ID!
|
Returns a CheckMirrorRepositoryConnectionResult!
Name | Description |
---|---|
repository - ID
|
The ID of the existing repository whose mirror to check. |
name - String
|
The name of a repository whose mirror to check. If the name is provided, the repository need not be added to the site (but the site configuration must define a code host that knows how to handle the name). |
mutation checkMirrorRepositoryConnection(
$repository: ID,
$name: String
) {
checkMirrorRepositoryConnection(
repository: $repository,
name: $name
) {
error
}
}
Returns a SettingsMutation
Name | Description |
---|---|
input - SettingsMutationGroupInput!
|
mutation configurationMutation($input: SettingsMutationGroupInput!) {
configurationMutation(input: $input) {
editSettings {
...UpdateSettingsPayloadFragment
}
editConfiguration {
...UpdateSettingsPayloadFragment
}
overwriteSettings {
...UpdateSettingsPayloadFragment
}
}
}
Creates an access token that grants the privileges of the specified user (referred to as the access token's "subject" user after token creation). The result is the access token value, which the caller is responsible for storing (it is not accessible by Sourcegraph after creation).
The supported scopes are:
- "user:all": Full control of all resources accessible to the user account.
- "site-admin:sudo": Ability to perform any action as any other user. (Only site admins may create tokens with this scope.)
Only the user or site admins may perform this mutation.
Returns a CreateAccessTokenResult!
Name | Description |
---|---|
user - ID!
|
|
scopes - [String!]!
|
|
note - String!
|
mutation createAccessToken(
$user: ID!,
$scopes: [String!]!,
$note: String!
) {
createAccessToken(
user: $user,
scopes: $scopes,
note: $note
) {
id
token
}
}
Returns an ExecutorSecret!
Name | Description |
---|---|
scope - ExecutorSecretScope!
|
The scope for which the secret is usable. |
key - String!
|
The key under which the secret is known. For executions, this is the name of the environment variable this secret will be accessible under. It is therefore advised that key only contains uppercase letters, numbers and underscores. |
value - String!
|
The secret value. |
namespace - ID
|
The namespace this secret is for. If not set, a global secret is created that is accessible by all users. Creating a global secret requires site-admin permissions. Creating a namespaced secret requires write-access to the namespace. |
mutation createExecutorSecret(
$scope: ExecutorSecretScope!,
$key: String!,
$value: String!,
$namespace: ID
) {
createExecutorSecret(
scope: $scope,
key: $key,
value: $value,
namespace: $namespace
) {
id
key
scope
overwritesGlobalSecret
namespace {
...NamespaceFragment
}
creator {
...UserFragment
}
createdAt
updatedAt
accessLogs {
...ExecutorSecretAccessLogConnectionFragment
}
}
}
Returns a FeatureFlag!
Name | Description |
---|---|
name - String!
|
The name of the feature flag |
value - Boolean
|
The value of the feature flag. Only set if the new feature flag will be a concrete boolean flag. Mutually exclusive with rolloutBasisPoints. |
rolloutBasisPoints - Int
|
The ratio of users the feature flag will apply to, expressed in basis points (0.01%). Only set if the new feature flag will be a rollout flag. Mutually exclusive with value. |
mutation createFeatureFlag(
$name: String!,
$value: Boolean,
$rolloutBasisPoints: Int
) {
createFeatureFlag(
name: $name,
value: $value,
rolloutBasisPoints: $rolloutBasisPoints
) {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
}
Returns a FeatureFlagOverride!
mutation createFeatureFlagOverride(
$namespace: ID!,
$flagName: String!,
$value: Boolean!
) {
createFeatureFlagOverride(
namespace: $namespace,
flagName: $flagName,
value: $value
) {
id
namespace {
...NamespaceFragment
}
targetFlag {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
value
}
}
Returns an Org!
mutation createOrganization(
$name: String!,
$displayName: String,
$statsID: ID
) {
createOrganization(
name: $name,
displayName: $displayName,
statsID: $statsID
) {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
name
displayName
createdAt
members {
...NewUsersConnectionFragment
}
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
viewerPendingInvitation {
...OrganizationInvitationFragment
}
viewerCanAdminister
viewerIsMember
url
settingsURL
namespaceName
}
}
{
"data": {
"createOrganization": {
"executorSecrets": ExecutorSecretConnection,
"id": 4,
"name": "xyz789",
"displayName": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"members": NewUsersConnection,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"viewerPendingInvitation": OrganizationInvitation,
"viewerCanAdminister": false,
"viewerIsMember": false,
"url": "xyz789",
"settingsURL": "abc123",
"namespaceName": "abc123"
}
}
}
Returns an EmptyResponse
Name | Description |
---|---|
newPassword - String!
|
Returns a SavedSearch!
mutation createSavedSearch(
$description: String!,
$query: String!,
$notifyOwner: Boolean!,
$notifySlack: Boolean!,
$orgID: ID,
$userID: ID
) {
createSavedSearch(
description: $description,
query: $query,
notifyOwner: $notifyOwner,
notifySlack: $notifySlack,
orgID: $orgID,
userID: $userID
) {
id
description
query
notify
notifySlack
namespace {
...NamespaceFragment
}
slackWebhookURL
}
}
{
"description": "abc123",
"query": "abc123",
"notifyOwner": false,
"notifySlack": false,
"orgID": "4",
"userID": 4
}
Creates a team. The name must be unique, display name can be used to set a custom display value for the team inside Sourcegraph.
If readonly is true, the Sourcegraph UI will show a warning banner that this team is managed externally, and it can only be modified by site-admins. This is to prevent state drift from external systems that ingest team information into Sourcegraph. Readonly can only be set by site-admins.
Either parentTeam XOR parentTeamName can be specified to make the team a child team of the given parent. Only members of the parent team or site-admis can create a child team.
Returns a Team!
mutation createTeam(
$name: String!,
$displayName: String,
$readonly: Boolean,
$parentTeam: ID,
$parentTeamName: String
) {
createTeam(
name: $name,
displayName: $displayName,
readonly: $readonly,
parentTeam: $parentTeam,
parentTeamName: $parentTeamName
) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
{
"name": "abc123",
"displayName": "xyz789",
"readonly": false,
"parentTeam": "4",
"parentTeamName": "abc123"
}
Returns a CreateUserResult!
Name | Description |
---|---|
username - String!
|
The new user's username. |
email - String
|
The new user's optional email address. If given, it must be verified by the user. |
verifiedEmail - Boolean
|
Whether or not to mark the provided email address as verified. If unset or set to true, then the email address is immediately marked as verified - otherwise, the email may be marked as unverified if SMTP and password resets are enabled. |
mutation createUser(
$username: String!,
$email: String,
$verifiedEmail: Boolean
) {
createUser(
username: $username,
email: $email,
verifiedEmail: $verifiedEmail
) {
user {
...UserFragment
}
resetPasswordURL
}
}
Returns a Webhook!
mutation createWebhook(
$name: String!,
$codeHostKind: String!,
$codeHostURN: String!,
$secret: String
) {
createWebhook(
name: $name,
codeHostKind: $codeHostKind,
codeHostURN: $codeHostURN,
secret: $secret
) {
id
uuid
url
name
codeHostKind
codeHostURN
secret
updatedAt
updatedBy {
...UserFragment
}
createdAt
createdBy {
...UserFragment
}
webhookLogs {
...WebhookLogConnectionFragment
}
}
}
{
"name": "abc123",
"codeHostKind": "abc123",
"codeHostURN": "xyz789",
"secret": "xyz789"
}
{
"data": {
"createWebhook": {
"id": "4",
"uuid": "abc123",
"url": "xyz789",
"name": "xyz789",
"codeHostKind": "AWSCODECOMMIT",
"codeHostURN": "abc123",
"secret": "abc123",
"updatedAt": "2007-12-03T10:15:30Z",
"updatedBy": User,
"createdAt": "2007-12-03T10:15:30Z",
"createdBy": User,
"webhookLogs": WebhookLogConnection
}
}
}
Returns an EmptyResponse!
Returns an EmptyResponse
Name | Description |
---|---|
scope - ExecutorSecretScope!
|
The scope of the secret. |
id - ID!
|
The identifier of the secret that shall be deleted. |
Returns an EmptyResponse!
Name | Description |
---|---|
externalAccount - ID!
|
Returns an EmptyResponse!
mutation deleteExternalService(
$externalService: ID!,
$async: Boolean
) {
deleteExternalService(
externalService: $externalService,
async: $async
) {
alwaysNil
}
}
Returns an EmptyResponse!
Name | Description |
---|---|
name - String!
|
The name of the feature flag |
Returns an EmptyResponse!
Name | Description |
---|---|
id - ID!
|
The ID of the feature flag override to delete |
Soft or hard deletes an organization.
- When the second argument is not provided, it soft deletes an organization, marking it as deleted. Only site admins may perform this mutation.
- When the second argument is true, it hard deletes an organization and its associated resources. Hard deletion is currently only supported on cloud. Only org members may perform this mutation
Returns an EmptyResponse
Returns an EmptyResponse!
Returns an EmptyResponse!
Name | Description |
---|---|
repo - ID!
|
Returns an EmptyResponse
Name | Description |
---|---|
id - ID!
|
Returns an EmptyResponse
Deletes a user account. Only site admins may perform this mutation.
If hard == true, a hard delete is performed. By default, deletes are 'soft deletes' and could theoretically be undone with manual DB commands. If a hard delete is performed, the data is truly removed from the database and deletion can NEVER be undone.
Data that is deleted as part of this operation:
- All user data (access tokens, email addresses, external account info, survey responses, etc)
- Organization membership information (which organizations the user is a part of, any invitations created by or targeting the user).
- Sourcegraph extensions published by the user.
- User, Organization, or Global settings authored by the user.
Returns an EmptyResponse
Returns an EmptyResponse
Returns an EmptyResponse!
Name | Description |
---|---|
id - ID!
|
Returns an EmptyResponse!
Name | Description |
---|---|
settingsToEdit - String!
|
The settings to merge with the current temporary settings for the current user, as a JSON string. |
Returns an EmptyResponse!
mutation excludeRepoFromExternalServices(
$externalServices: [ID!]!,
$repo: ID!
) {
excludeRepoFromExternalServices(
externalServices: $externalServices,
repo: $repo
) {
alwaysNil
}
}
Returns an EmptyResponse
Name | Description |
---|---|
userID - ID!
|
Returns an EmptyResponse
Name | Description |
---|---|
userIDs - [ID!]!
|
Sends an invitation to join Sourcegraph to the given email address.
Returns instantly regardless of whether or not an invitation email was actually sent. For example, the email may fail to send if there is a typo or it is invalid, or Sourcegraph may refuse to send it due to spam concerns or if the user has been invited too recently.
Returns an EmptyResponse!
Name | Description |
---|---|
email - String!
|
Returns an InviteUserToOrganizationResult!
mutation inviteUserToOrganization(
$organization: ID!,
$username: String,
$email: String
) {
inviteUserToOrganization(
organization: $organization,
username: $username,
email: $email
) {
sentInvitationEmail
invitationURL
}
}
Returns an EmptyResponse
Name | Description |
---|---|
event - String!
|
The name of the event. |
userCookieID - String!
|
The randomly generated unique user ID stored in a browser cookie. |
firstSourceURL - String
|
The first sourcegraph URL visited by the user, stored in a browser cookie. |
lastSourceURL - String
|
The last sourcegraph URL visited by the user, stored in a browser cookie. |
url - String!
|
The URL when the event was logged. |
source - EventSource!
|
The source of the event. |
cohortID - String
|
An optional cohort ID to identify the user as part of a specific A/B test. The cohort ID is expected to be a date in the form YYYY-MM-DD |
referrer - String
|
An optional referrer parameter for the user's current session. Only captured and stored on Sourcegraph Cloud. |
originalReferrer - String
|
The original referrer for a user |
sessionReferrer - String
|
The session referrer for a user |
sessionFirstURL - String
|
The sessions first url for a user |
deviceSessionID - String
|
Device session ID to identify the user's session for analytics. |
argument - String
|
The additional argument information. |
publicArgument - String
|
Public argument information. PRIVACY: Do NOT include any potentially private information in this field. These properties get sent to our analytics tools for Cloud, so must not include private information, such as search queries or repository names. |
deviceID - String
|
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only. |
eventID - Int
|
Event ID used to deduplicate events that occur simultaneously in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only. |
insertID - String
|
Insert ID used to deduplicate events that re-occur in the event of retries or backfills in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only. |
mutation logEvent(
$event: String!,
$userCookieID: String!,
$firstSourceURL: String,
$lastSourceURL: String,
$url: String!,
$source: EventSource!,
$cohortID: String,
$referrer: String,
$originalReferrer: String,
$sessionReferrer: String,
$sessionFirstURL: String,
$deviceSessionID: String,
$argument: String,
$publicArgument: String,
$deviceID: String,
$eventID: Int,
$insertID: String
) {
logEvent(
event: $event,
userCookieID: $userCookieID,
firstSourceURL: $firstSourceURL,
lastSourceURL: $lastSourceURL,
url: $url,
source: $source,
cohortID: $cohortID,
referrer: $referrer,
originalReferrer: $originalReferrer,
sessionReferrer: $sessionReferrer,
sessionFirstURL: $sessionFirstURL,
deviceSessionID: $deviceSessionID,
argument: $argument,
publicArgument: $publicArgument,
deviceID: $deviceID,
eventID: $eventID,
insertID: $insertID
) {
alwaysNil
}
}
{
"event": "xyz789",
"userCookieID": "abc123",
"firstSourceURL": "xyz789",
"lastSourceURL": "abc123",
"url": "xyz789",
"source": "WEB",
"cohortID": "xyz789",
"referrer": "xyz789",
"originalReferrer": "abc123",
"sessionReferrer": "xyz789",
"sessionFirstURL": "abc123",
"deviceSessionID": "abc123",
"argument": "abc123",
"publicArgument": "xyz789",
"deviceID": "xyz789",
"eventID": 123,
"insertID": "xyz789"
}
Returns an EmptyResponse
Name | Description |
---|---|
events - [Event!]
|
Returns an EmptyResponse
Name | Description |
---|---|
event - UserEvent!
|
|
userCookieID - String!
|
Returns an EmptyResponse!
Name | Description |
---|---|
contents - String!
|
The new temporary settings for the current user, as a JSON string. |
Returns a RandomizeUserPasswordResult!
Name | Description |
---|---|
user - ID!
|
Returns an EmptyResponse!
Name | Description |
---|---|
repo - ID!
|
Returns an EmptyResponse
Name | Description |
---|---|
userIDs - [ID!]!
|
Returns an EmptyResponse!
Name | Description |
---|---|
repository - ID!
|
The repository to index |
Returns an EmptyResponse
This mutation removes team membership for the given team and set of members. Members that weren't part of the team are ignored.
Either team XOR teamName can be specified to specify the team. Must be team member to remove team members, or site-admin.
For now, members can only be the IDs of User entities in Sourcegraph. Later, we will expand this to allow Persons as well.
mutation removeTeamMembers(
$team: ID,
$teamName: String,
$members: [ID!]!
) {
removeTeamMembers(
team: $team,
teamName: $teamName,
members: $members
) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
Returns an EmptyResponse!
Returns an EmptyResponse
Returns an EmptyResponse!
Name | Description |
---|---|
organizationInvitation - ID!
|
The organization invitation. |
mutation resendOrganizationInvitationNotification($organizationInvitation: ID!) {
resendOrganizationInvitationNotification(organizationInvitation: $organizationInvitation) {
alwaysNil
}
}
Returns an EmptyResponse!
Returns a GitCommit
Name | Description |
---|---|
repoName - String!
|
The name of the repository that the diff is based on. |
diffID - ID!
|
The ID of the diff on Phabricator. |
baseRev - String!
|
The base revision this diff is based on. |
patch - String
|
The raw contents of the diff from Phabricator. Required if Sourcegraph doesn't have a Conduit API token. |
description - String
|
The description of the diff. This will be used as the commit message. |
authorName - String
|
The name of author of the diff. |
authorEmail - String
|
The author's email. |
date - String
|
When the diff was created. |
mutation resolvePhabricatorDiff(
$repoName: String!,
$diffID: ID!,
$baseRev: String!,
$patch: String,
$description: String,
$authorName: String,
$authorEmail: String,
$date: String
) {
resolvePhabricatorDiff(
repoName: $repoName,
diffID: $diffID,
baseRev: $baseRev,
patch: $patch,
description: $description,
authorName: $authorName,
authorEmail: $authorEmail,
date: $date
) {
id
repository {
...RepositoryFragment
}
oid
abbreviatedOID
author {
...SignatureFragment
}
committer {
...SignatureFragment
}
message
subject
body
parents {
...GitCommitFragment
}
url
canonicalURL
externalURLs {
...ExternalLinkFragment
}
path {
... on GitTree {
...GitTreeFragment
}
... on GitBlob {
...GitBlobFragment
}
}
tree {
...GitTreeFragment
}
fileNames
blob {
...GitBlobFragment
}
file {
...File2Fragment
}
languages
languageStatistics {
...LanguageStatisticsFragment
}
ancestors {
...GitCommitConnectionFragment
}
behindAhead {
...BehindAheadCountsFragment
}
symbols {
...SymbolConnectionFragment
}
diff {
...RepositoryComparisonFragment
}
}
}
{
"repoName": "xyz789",
"diffID": "4",
"baseRev": "xyz789",
"patch": "abc123",
"description": "xyz789",
"authorName": "xyz789",
"authorEmail": "abc123",
"date": "abc123"
}
{
"data": {
"resolvePhabricatorDiff": {
"id": "4",
"repository": Repository,
"oid": GitObjectID,
"abbreviatedOID": "xyz789",
"author": Signature,
"committer": Signature,
"message": "xyz789",
"subject": "abc123",
"body": "abc123",
"parents": [GitCommit],
"url": "abc123",
"canonicalURL": "xyz789",
"externalURLs": [ExternalLink],
"path": GitTree,
"tree": GitTree,
"fileNames": ["abc123"],
"blob": GitBlob,
"file": File2,
"languages": ["abc123"],
"languageStatistics": [LanguageStatistics],
"ancestors": GitCommitConnection,
"behindAhead": BehindAheadCounts,
"symbols": SymbolConnection,
"diff": RepositoryComparison
}
}
}
Returns an EmptyResponse!
Name | Description |
---|---|
organizationInvitation - ID!
|
The organization invitation. |
responseType - OrganizationInvitationResponseType!
|
The response to the invitation. |
mutation respondToOrganizationInvitation(
$organizationInvitation: ID!,
$responseType: OrganizationInvitationResponseType!
) {
respondToOrganizationInvitation(
organizationInvitation: $organizationInvitation,
responseType: $responseType
) {
alwaysNil
}
}
Revoke an existing organization invitation.
If the invitation has been accepted or rejected, it may no longer be revoked. After an invitation is revoked, the recipient may not accept or reject it. Both cases yield an error.
Only site admins and any member of the organization may perform this mutation.
Returns an EmptyResponse!
Name | Description |
---|---|
organizationInvitation - ID!
|
The organization invitation. |
mutation revokeOrganizationInvitation($organizationInvitation: ID!) {
revokeOrganizationInvitation(organizationInvitation: $organizationInvitation) {
alwaysNil
}
}
Updates an out-of-band migration to run in a particular direction.
Applied in the forward direction, an out-of-band migration migrates data into a format that is readable by newer Sourcegraph instances. This may be destructive or non-destructive process, depending on the nature and implementation of the migration.
Applied in the reverse direction, an out-of-band migration ensures that data is moved back into a format that is readable by the previous Sourcegraph instance. Recently introduced migrations should be applied in reverse prior to downgrading the instance.
Returns an EmptyResponse!
Returns an EmptyResponse!
Name | Description |
---|---|
searchable - Boolean!
|
Returns an EmptyResponse!
Name | Description |
---|---|
node - ID!
|
The ID of the user whose tags to set. (This parameter is named "node" to make it easy to support tagging other types of nodes other than users in the future.) |
tag - String!
|
The tag to set. |
present - Boolean!
|
The desired state of the tag on the user (whether to add or remove): true to add, false to remove. |
This is a convenience method to forcefully overwrite the full set of members of a team. This is handy to sync external state without diffing the current members vs the desired set of members.
Either team XOR teamName can be specified to specify the team. Must be team member to modify team members, or site-admin.
For now, members can only be the IDs of User entities in Sourcegraph. Later, we will expand this to allow Persons as well.
mutation setTeamMembers(
$team: ID,
$teamName: String,
$members: [ID!]!
) {
setTeamMembers(
team: $team,
teamName: $teamName,
members: $members
) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
Returns an EmptyResponse!
Name | Description |
---|---|
userID - ID
|
Returns an EmptyResponse!
Returns an EmptyResponse!
mutation setUserEmailVerified(
$user: ID!,
$email: String!,
$verified: Boolean!
) {
setUserEmailVerified(
user: $user,
email: $email,
verified: $verified
) {
alwaysNil
}
}
Returns an EmptyResponse
All mutations that update settings (global, organization, and user settings) are under this field.
Only the settings subject whose settings are being mutated (and site admins) may perform this mutation.
This mutation only affects global, organization, and user settings, not site configuration. For site configuration (which is a separate set of configuration properties from global/organization/user settings), use updateSiteConfiguration.
Returns a SettingsMutation
Name | Description |
---|---|
input - SettingsMutationGroupInput!
|
mutation settingsMutation($input: SettingsMutationGroupInput!) {
settingsMutation(input: $input) {
editSettings {
...UpdateSettingsPayloadFragment
}
editConfiguration {
...UpdateSettingsPayloadFragment
}
overwriteSettings {
...UpdateSettingsPayloadFragment
}
}
}
Returns an EmptyResponse
Name | Description |
---|---|
input - HappinessFeedbackSubmissionInput!
|
Returns an EmptyResponse
Name | Description |
---|---|
input - SurveySubmissionInput!
|
Returns an EmptyResponse!
Name | Description |
---|---|
id - ID!
|
Returns an EmptyResponse!
Name | Description |
---|---|
level - String!
|
Level of alert to test - either warning or critical. |
Returns an ExecutorSecret!
Name | Description |
---|---|
scope - ExecutorSecretScope!
|
The scope of the secret. |
id - ID!
|
The identifier of the secret that shall be updated. |
value - String!
|
The new secret value. |
mutation updateExecutorSecret(
$scope: ExecutorSecretScope!,
$id: ID!,
$value: String!
) {
updateExecutorSecret(
scope: $scope,
id: $id,
value: $value
) {
id
key
scope
overwritesGlobalSecret
namespace {
...NamespaceFragment
}
creator {
...UserFragment
}
createdAt
updatedAt
accessLogs {
...ExecutorSecretAccessLogConnectionFragment
}
}
}
Returns an ExternalService!
Name | Description |
---|---|
input - UpdateExternalServiceInput!
|
mutation updateExternalService($input: UpdateExternalServiceInput!) {
updateExternalService(input: $input) {
id
kind
displayName
config
createdAt
updatedAt
repoCount
webhookURL
warning
lastSyncError
lastSyncAt
nextSyncAt
webhookLogs {
...WebhookLogConnectionFragment
}
syncJobs {
...ExternalServiceSyncJobConnectionFragment
}
checkConnection {
... on ExternalServiceAvailable {
...ExternalServiceAvailableFragment
}
... on ExternalServiceUnavailable {
...ExternalServiceUnavailableFragment
}
... on ExternalServiceAvailabilityUnknown {
...ExternalServiceAvailabilityUnknownFragment
}
}
hasConnectionCheck
supportsRepoExclusion
}
}
{
"data": {
"updateExternalService": {
"id": 4,
"kind": "AWSCODECOMMIT",
"displayName": "abc123",
"config": JSONCString,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"repoCount": 987,
"webhookURL": "abc123",
"warning": "abc123",
"lastSyncError": "abc123",
"lastSyncAt": "2007-12-03T10:15:30Z",
"nextSyncAt": "2007-12-03T10:15:30Z",
"webhookLogs": WebhookLogConnection,
"syncJobs": ExternalServiceSyncJobConnection,
"checkConnection": ExternalServiceAvailable,
"hasConnectionCheck": false,
"supportsRepoExclusion": true
}
}
}
Returns a FeatureFlag!
Name | Description |
---|---|
name - String!
|
The name of the feature flag |
value - Boolean
|
The value of the feature flag. Only set if the new feature flag will be a concrete boolean flag. Mutually exclusive with rollout. |
rolloutBasisPoints - Int
|
The ratio of users the feature flag will apply to, expressed in basis points (0.01%). Mutually exclusive with value. |
mutation updateFeatureFlag(
$name: String!,
$value: Boolean,
$rolloutBasisPoints: Int
) {
updateFeatureFlag(
name: $name,
value: $value,
rolloutBasisPoints: $rolloutBasisPoints
) {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
}
Returns a FeatureFlagOverride!
mutation updateFeatureFlagOverride(
$id: ID!,
$value: Boolean!
) {
updateFeatureFlagOverride(
id: $id,
value: $value
) {
id
namespace {
...NamespaceFragment
}
targetFlag {
... on FeatureFlagBoolean {
...FeatureFlagBooleanFragment
}
... on FeatureFlagRollout {
...FeatureFlagRolloutFragment
}
}
value
}
}
Returns an EmptyResponse!
Name | Description |
---|---|
repository - ID!
|
The mirror repository to update. |
mutation updateOrganization(
$id: ID!,
$displayName: String
) {
updateOrganization(
id: $id,
displayName: $displayName
) {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
name
displayName
createdAt
members {
...NewUsersConnectionFragment
}
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
viewerPendingInvitation {
...OrganizationInvitationFragment
}
viewerCanAdminister
viewerIsMember
url
settingsURL
namespaceName
}
}
{
"data": {
"updateOrganization": {
"executorSecrets": ExecutorSecretConnection,
"id": 4,
"name": "abc123",
"displayName": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"members": NewUsersConnection,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"viewerPendingInvitation": OrganizationInvitation,
"viewerCanAdminister": true,
"viewerIsMember": false,
"url": "xyz789",
"settingsURL": "abc123",
"namespaceName": "abc123"
}
}
}
Returns an EmptyResponse
mutation updatePassword(
$oldPassword: String!,
$newPassword: String!
) {
updatePassword(
oldPassword: $oldPassword,
newPassword: $newPassword
) {
alwaysNil
}
}
Returns an EmptyResponse!
mutation updateRepoKeyValuePair(
$repo: ID!,
$key: String!,
$value: String
) {
updateRepoKeyValuePair(
repo: $repo,
key: $key,
value: $value
) {
alwaysNil
}
}
Returns a SavedSearch!
mutation updateSavedSearch(
$id: ID!,
$description: String!,
$query: String!,
$notifyOwner: Boolean!,
$notifySlack: Boolean!,
$orgID: ID,
$userID: ID
) {
updateSavedSearch(
id: $id,
description: $description,
query: $query,
notifyOwner: $notifyOwner,
notifySlack: $notifySlack,
orgID: $orgID,
userID: $userID
) {
id
description
query
notify
notifySlack
namespace {
...NamespaceFragment
}
slackWebhookURL
}
}
{
"id": "4",
"description": "abc123",
"query": "abc123",
"notifyOwner": true,
"notifySlack": false,
"orgID": "4",
"userID": "4"
}
Returns a Boolean!
Name | Description |
---|---|
lastID - Int!
|
The last ID of the site configuration that is known by the client, to prevent race conditions. An error will be returned if someone else has already written a new update. |
input - String!
|
A JSON object containing the entire site configuration. The previous site configuration will be replaced with this new value. |
Update an existing team. ID or Name must be specified, but not both.
To unset the display name, pass an empty string. Null will make it ignore updates.
Either parentTeam XOR parentTeamName can be specified to make the team a child team of the given parent. The user has to be a team-member of both the child and parent team for that, and neither can be read-only. Site-admin can modify all teams without constraints.
Returns a Team!
mutation updateTeam(
$id: ID,
$name: String,
$displayName: String,
$parentTeam: ID,
$parentTeamName: String
) {
updateTeam(
id: $id,
name: $name,
displayName: $displayName,
parentTeam: $parentTeam,
parentTeamName: $parentTeamName
) {
id
name
url
displayName
readonly
members {
...TeamMemberConnectionFragment
}
parentTeam {
...TeamFragment
}
childTeams {
...TeamConnectionFragment
}
viewerCanAdminister
}
}
{
"id": 4,
"name": "abc123",
"displayName": "xyz789",
"parentTeam": 4,
"parentTeamName": "xyz789"
}
Returns a User!
mutation updateUser(
$user: ID!,
$username: String,
$displayName: String,
$avatarURL: String
) {
updateUser(
user: $user,
username: $username,
displayName: $displayName,
avatarURL: $avatarURL
) {
executorSecrets {
...ExecutorSecretConnectionFragment
}
id
username
email
displayName
avatarURL
url
settingsURL
createdAt
updatedAt
siteAdmin
builtinAuth
latestSettings {
...SettingsFragment
}
settingsCascade {
...SettingsCascadeFragment
}
configurationCascade {
...ConfigurationCascadeFragment
}
organizations {
...OrgConnectionFragment
}
organizationMemberships {
...OrganizationMembershipConnectionFragment
}
tags
tosAccepted
searchable
usageStatistics {
...UserUsageStatisticsFragment
}
eventLogs {
...EventLogsConnectionFragment
}
emails {
...UserEmailFragment
}
accessTokens {
...AccessTokenConnectionFragment
}
externalAccounts {
...ExternalAccountConnectionFragment
}
session {
...SessionFragment
}
viewerCanAdminister
viewerCanChangeUsername
surveyResponses {
...SurveyResponseFragment
}
databaseID
namespaceName
invitableCollaborators {
...PersonFragment
}
teams {
...TeamConnectionFragment
}
}
}
{
"data": {
"updateUser": {
"executorSecrets": ExecutorSecretConnection,
"id": 4,
"username": "xyz789",
"email": "xyz789",
"displayName": "abc123",
"avatarURL": "abc123",
"url": "abc123",
"settingsURL": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"siteAdmin": true,
"builtinAuth": true,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"organizations": OrgConnection,
"organizationMemberships": OrganizationMembershipConnection,
"tags": ["xyz789"],
"tosAccepted": false,
"searchable": true,
"usageStatistics": UserUsageStatistics,
"eventLogs": EventLogsConnection,
"emails": [UserEmail],
"accessTokens": AccessTokenConnection,
"externalAccounts": ExternalAccountConnection,
"session": Session,
"viewerCanAdminister": false,
"viewerCanChangeUsername": false,
"surveyResponses": [SurveyResponse],
"databaseID": 123,
"namespaceName": "abc123",
"invitableCollaborators": [Person],
"teams": TeamConnection
}
}
}
Returns a Webhook!
mutation updateWebhook(
$id: ID!,
$name: String,
$codeHostKind: String,
$codeHostURN: String,
$secret: String
) {
updateWebhook(
id: $id,
name: $name,
codeHostKind: $codeHostKind,
codeHostURN: $codeHostURN,
secret: $secret
) {
id
uuid
url
name
codeHostKind
codeHostURN
secret
updatedAt
updatedBy {
...UserFragment
}
createdAt
createdBy {
...UserFragment
}
webhookLogs {
...WebhookLogConnectionFragment
}
}
}
{
"id": 4,
"name": "xyz789",
"codeHostKind": "xyz789",
"codeHostURN": "xyz789",
"secret": "xyz789"
}
{
"data": {
"updateWebhook": {
"id": "4",
"uuid": "xyz789",
"url": "abc123",
"name": "xyz789",
"codeHostKind": "AWSCODECOMMIT",
"codeHostURN": "abc123",
"secret": "xyz789",
"updatedAt": "2007-12-03T10:15:30Z",
"updatedBy": User,
"createdAt": "2007-12-03T10:15:30Z",
"createdBy": User,
"webhookLogs": WebhookLogConnection
}
}
}
Field Name | Description |
---|---|
id - ID!
|
The unique ID for the access token. |
subject - User!
|
The user whose privileges the access token grants. |
scopes - [String!]!
|
The scopes that define the allowed set of operations that can be performed using this access token. |
note - String!
|
A user-supplied descriptive note for the access token. |
creator - User!
|
The user who created the access token. This is either the subject user (if the access token was created by the same user) or a site admin (who can create access tokens for any user). |
createdAt - DateTime!
|
The date when the access token was created. |
lastUsedAt - DateTime
|
The date when the access token was last used to authenticate a request. |
Field Name | Description |
---|---|
nodes - [AccessToken!]!
|
A list of access tokens. |
totalCount - Int!
|
The total count of access tokens in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
Input Field | Description |
---|---|
kind - ExternalServiceKind!
|
The kind of the external service. |
displayName - String!
|
The display name of the external service. |
config - String!
|
The JSON configuration of the external service. |
namespace - ID
|
The namespace this external service belongs to. This can be used both for a user and an organization. |
Field Name | Description |
---|---|
type - AlertType!
|
The type of this alert. |
message - String!
|
The message body of this alert. Markdown is supported. |
isDismissibleWithKey - String
|
If set, this alert is dismissible. After being dismissed, no other alerts with the same isDismissibleWithKey value will be shown. If null, this alert is not dismissible. |
Field Name | Description |
---|---|
search - AnalyticsSearchResult!
|
Search statistics. |
|
|
notebooks - AnalyticsNotebooksResults!
|
Notebooks statistics. |
|
|
users - AnalyticsUsersResult!
|
Users statistics. |
|
|
codeIntel - AnalyticsCodeIntelResult!
|
Code-intelligence statistics. |
|
|
codeIntelByLanguage - [AnalyticsCodeIntelByLanguageResult!]!
|
Code-intelligence statistics grouped by language and precision. |
|
|
codeIntelTopRepositories - [AnalyticsCodeIntelRepositoryResult!]!
|
Top repositories by code-intelligence events. |
|
|
repos - AnalyticsReposSummartResult!
|
Repositories summary statistics. |
batchChanges - AnalyticsBatchChangesResult!
|
Batch changes statistics |
|
|
extensions - AnalyticsExtensionsResult!
|
Extensions statistics |
|
|
codeInsights - AnalyticsCodesInsightsResult!
|
Code insights statistics |
|
{
"search": AnalyticsSearchResult,
"notebooks": AnalyticsNotebooksResults,
"users": AnalyticsUsersResult,
"codeIntel": AnalyticsCodeIntelResult,
"codeIntelByLanguage": [
AnalyticsCodeIntelByLanguageResult
],
"codeIntelTopRepositories": [
AnalyticsCodeIntelRepositoryResult
],
"repos": AnalyticsReposSummartResult,
"batchChanges": AnalyticsBatchChangesResult,
"extensions": AnalyticsExtensionsResult,
"codeInsights": AnalyticsCodesInsightsResult
}
Field Name | Description |
---|---|
changesetsCreated - AnalyticsStatItem!
|
Changesets created |
changesetsMerged - AnalyticsStatItem!
|
Changesets merged |
Field Name | Description |
---|---|
referenceClicks - AnalyticsStatItem!
|
"GoToRef" click |
definitionClicks - AnalyticsStatItem!
|
"GoToDef" click |
inAppEvents - AnalyticsStatItem!
|
Code Intel events made from web |
codeHostEvents - AnalyticsStatItem!
|
Code Intel events made from code host |
searchBasedEvents - AnalyticsStatItem!
|
Search based events |
preciseEvents - AnalyticsStatItem!
|
Precise events |
crossRepoEvents - AnalyticsStatItem!
|
Cross-repo events |
Field Name | Description |
---|---|
insightHovers - AnalyticsStatItem!
|
Insights hovers statistics. |
insightDataPointClicks - AnalyticsStatItem!
|
Insights data point clicks statistics. |
Field Name | Description |
---|---|
jetbrains - AnalyticsStatItem!
|
JetBrains IDE plugin search events. |
vscode - AnalyticsStatItem!
|
VSCode IDE extension search events. |
browser - AnalyticsStatItem!
|
Browser (chrome, firefox, safari) extensions code navigation events. This includes events like "Go to Def", "Find ref" and "Find implementation" |
Field Name | Description |
---|---|
creations - AnalyticsStatItem!
|
Notebooks creation analytics. |
views - AnalyticsStatItem!
|
Notebooks views analytics. |
blockRuns - AnalyticsStatItem!
|
Notebooks block run analytics. |
Field Name | Description |
---|---|
searches - AnalyticsStatItem!
|
Searches analytics |
resultClicks - AnalyticsStatItem!
|
Search result click analytics |
fileViews - AnalyticsStatItem!
|
File view analytics |
fileOpens - AnalyticsStatItem!
|
File open analytics |
codeCopied - AnalyticsStatItem!
|
Code copied from search results analytics |
Field Name | Description |
---|---|
summary - AnalyticsStatItemSummary!
|
Analytics summary. |
nodes - [AnalyticsStatItemNode!]!
|
Array of analytics by period. |
Field Name | Description |
---|---|
date - String!
|
A date in ISO format |
count - Float!
|
Total number of events. |
uniqueUsers - Float!
|
Unique number of users who triggered event. This counts deleted users as well as anonymous users. |
registeredUsers - Float!
|
Unique number of currently registered users who triggered event. |
Field Name | Description |
---|---|
activity - AnalyticsStatItem!
|
Users' activity analytics. |
frequencies - [AnalyticsUsersFrequencyItem!]!
|
Frequency of usage by day. |
monthlyActiveUsers - [AnalyticsMonthlyActiveUsers!]!
|
Monthly active users for last 3 months. |
A provider of user authentication, such as an external single-sign-on service (e.g., using OpenID Connect or SAML). The provider information in this type is visible to all viewers and does not contain any secret values.
Field Name | Description |
---|---|
serviceType - String!
|
The type of the auth provider. |
serviceID - String!
|
An identifier for the service that the auth provider represents. |
clientID - String!
|
An identifier for the client of the service that the auth provider represents. |
displayName - String!
|
The human-readable name of the provider. |
isBuiltin - Boolean!
|
Whether this auth provider is the builtin username-password auth provider. |
authenticationURL - String
|
A URL that, when visited, initiates the authentication process for this auth provider. |
Field Name | Description |
---|---|
nodes - [AuthProvider!]!
|
A list of authentication providers. |
totalCount - Int!
|
The total count of authentication providers in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
The background job ID. |
name - String!
|
The name of the job. |
routines - [BackgroundRoutine!]!
|
The routines that run inside this job. |
Field Name | Description |
---|---|
nodes - [BackgroundJob!]!
|
A list of outbound requests. |
totalCount - Int!
|
The total number of outbound request log items in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
name - String!
|
The name of the routine. |
type - BackgroundRoutineType!
|
Tells whether this is a periodic goroutine, a DB worker, or something else |
description - String!
|
Explains what the routine does. |
intervalMs - Int
|
The interval at which the routine runs, if it's periodic. |
instances - [BackgroundRoutineInstance!]!
|
The instances of this routine that are running or ran recently. An instance means one routine on one host. |
recentRuns - [BackgroundRoutineRecentRun!]!
|
The recent runs of this routine. |
stats - BackgroundRoutineStats!
|
Some stats of the runs of this routine in the past few days. |
A single run of the routine. A run is not the start/stop event but the actual execution of the routine handler.
Field Name | Description |
---|---|
since - DateTime
|
The start of the earliest day for which we have any runs registered. |
runCount - Int!
|
The number of times the routine ran in the period. |
errorCount - Int!
|
The number of times the routine run ended with an error. |
minDurationMs - Int!
|
The minimum duration of a run, in milliseconds. |
avgDurationMs - Int!
|
The average duration of a run, in milliseconds. |
maxDurationMs - Int!
|
The maximum duration of a run, in milliseconds. |
Pagination information for bi-directional pagination. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.
Field Name | Description |
---|---|
startCursor - String
|
When paginating backwards, the cursor to continue. |
endCursor - String
|
When paginating forwards, the cursor to continue. |
hasPreviousPage - Boolean!
|
When paginating backwards, are there more items? |
hasNextPage - Boolean!
|
When paginating forwards, are there more items? |
Field Name | Description |
---|---|
error - String
|
The error message encountered during the update operation, if any. If null, then the connection check succeeded. |
Field Name | Description |
---|---|
contentScriptUrls - [String!]!
|
The list of phabricator/gitlab/bitbucket/etc instance URLs that specifies which pages the content script will be injected into. |
parentSourcegraph - ParentSourcegraphDetails!
|
Returns details about the parent Sourcegraph instance. |
Field Name | Description |
---|---|
message - String!
|
The message of this status message |
Field Name | Description |
---|---|
id - ID!
|
The globally addressable ID for this commit. |
oid - GitObjectID!
|
This commit's Git object ID (OID), a 40-character SHA-1 hash. |
abbreviatedOID - String!
|
The abbreviated form of this commit's OID. |
url - String!
|
The URL to this commit (using the input revision specifier, which may not be immutable). |
repository - CodeIntelRepository!
|
The repository that contains this commit. |
Field Name | Description |
---|---|
serviceType - String!
|
The type of external service where this repository resides. Example: "github", "gitlab", etc. |
serviceID - String!
|
The particular instance of the external service where this repository resides. Its value is opaque but typically consists of the canonical base URL to the service. Example: For GitHub.com, this is "https://github.com/". |
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the root) of this tree. |
name - String!
|
The base name (i.e., last path component only) of this tree. |
commit - CodeIntelCommit!
|
The Git commit containing this tree. |
url - String!
|
The URL to this tree (using the input revision specifier, which may not be immutable). |
repository - CodeIntelRepository!
|
The repository containing this tree. |
content - String!
|
The content of this blob. |
A codeintel repository is a Git source control repository that is mirrored from some origin code host and it is specific to code intel.
Field Name | Description |
---|---|
id - ID!
|
The globally addressable ID for this commit. |
name - String!
|
The repository's name, as a path with one or more components. It conventionally consists of the repository's hostname and path (joined by "/"), minus any suffixes (such as ".git"). Examples:
|
url - String!
|
The URL to this repository. |
externalRepository - CodeIntelExternalRepository
|
Information about this repository from the external service that it originates from (such as GitHub, GitLab, Phabricator, etc.). Only populated when used as part of repository list previews for configuration policies. |
Information and status related to the commit graph of this repository calculated for use by code intelligence features.
Field Name | Description |
---|---|
label - Markdown!
|
A markdown string that is rendered prominently. |
url - String!
|
The URL of the result. |
detail - Markdown!
|
A markdown string of that is rendered less prominently. |
matches - [SearchResultMatch!]!
|
The result previews of the result. |
commit - GitCommit!
|
The commit that matched the search query. |
refs - [GitRef!]!
|
The ref names of the commit. |
sourceRefs - [GitRef!]!
|
The refs by which this commit was reached. |
messagePreview - HighlightedString
|
The matching portion of the commit message, if any. |
diffPreview - HighlightedString
|
The matching portion of the diff, if any. |
DEPRECATED: Use the contents field on the parent type instead. This type will be removed in a future release.
Field Name | Description |
---|---|
contents - JSONCString!
|
DEPRECATED: This field will be removed in a future release. The raw JSON contents, encoded as a string. use the contents field on the parent type instead |
messages - [String!]!
|
DEPRECATED: This field is always empty. It will be removed in a future release. use client-side JSON Schema validation instead |
Field Name | Description |
---|---|
subjects - [SettingsSubject!]!
|
DEPRECATED use SettingsCascade.subjects instead |
merged - Configuration!
|
DEPRECATED use SettingsCascade.final instead |
DEPRECATED: This type was renamed to SettingsEdit. NOTE: GraphQL does not support @deprecated directives on INPUT_FIELD_DEFINITION (input fields).
Input Field | Description |
---|---|
keyPath - [KeyPathSegment!]!
|
DEPRECATED |
value - JSONValue
|
DEPRECATED |
valueIsJSONCEncodedString - Boolean
|
DEPRECATED. Default = false |
Field Name | Description |
---|---|
totalCount - Int!
|
The total count of items in the connection. |
pageInfo - ConnectionPageInfo!
|
The pagination info for the connection. |
Connection Types |
---|
Field Name | Description |
---|---|
endCursor - String
|
When paginating forwards, the cursor to continue. |
hasNextPage - Boolean!
|
When paginating forwards, are there more items? |
startCursor - String
|
When paginating backward, the cursor to continue. |
hasPreviousPage - Boolean!
|
When paginating backward, are there more items? |
Field Name | Description |
---|---|
user - User!
|
The new user. |
resetPasswordURL - String
|
The reset password URL that the new user must visit to sign into their account. If the builtin username-password authentication provider is not enabled, this field's value is null. If email sending (SMTP) is configured on this instance and an email was provided, an email containing this URL will also be sent to the primary email address associated with the user. |
The default settings for the Sourcegraph instance. This is hardcoded in Sourcegraph, but may change from release to release.
Field Name | Description |
---|---|
id - ID!
|
The opaque GraphQL ID. |
latestSettings - Settings
|
The latest default settings (this never changes). |
settingsURL - String
|
The URL to the default settings. This URL does not exist because you cannot edit or directly view default settings. |
viewerCanAdminister - Boolean!
|
Whether the viewer can modify the subject's settings. Always false for default settings. |
settingsCascade - SettingsCascade!
|
The default settings, and the final merged settings. All viewers can access this field. |
configurationCascade - ConfigurationCascade!
|
DEPRECATED Use settingsCascade instead. This field is a deprecated alias for it and will be removed in a future release. |
Field Name | Description |
---|---|
alwaysNil - String
|
A dummy null value. |
An evaluated feature flag is any feature flag (static or random) that has been evaluated to a concrete value for a given viewer.
Input Field | Description |
---|---|
event - String!
|
The name of the event. |
userCookieID - String!
|
The randomly generated unique user ID stored in a browser cookie. |
firstSourceURL - String
|
The first sourcegraph URL visited by the user, stored in a browser cookie. |
lastSourceURL - String
|
The last sourcegraph URL visited by the user, stored in a browser cookie. |
url - String!
|
The URL when the event was logged. |
source - EventSource!
|
The source of the event. |
cohortID - String
|
An optional cohort ID to identify the user as part of a specific A/B test. The cohort ID is expected to be a date in the form YYYY-MM-DD |
referrer - String
|
An optional referrer parameter for the user's current session. Only captured and stored on Sourcegraph Cloud. |
originalReferrer - String
|
The original referrer for a user |
sessionReferrer - String
|
The session referrer for a user |
sessionFirstURL - String
|
The sessions first url for a user |
deviceSessionID - String
|
Device session ID to identify the user's session for analytics. |
argument - String
|
The additional argument information. |
publicArgument - String
|
Public argument information. PRIVACY: Do NOT include any potentially private information in this field. These properties get sent to our analytics tools for Cloud, so must not include private information, such as search queries or repository names. |
deviceID - String
|
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only. |
eventID - Int
|
Event ID used to deduplicate events that occur simultaneously in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only. |
insertID - String
|
Insert ID used to deduplicate events that re-occur in the event of retries or backfills in Amplitude analytics. See https://developers.amplitude.com/docs/http-api-v2#optional-keys. Used on Sourcegraph Cloud only. |
{
"event": "xyz789",
"userCookieID": "xyz789",
"firstSourceURL": "abc123",
"lastSourceURL": "xyz789",
"url": "abc123",
"source": "WEB",
"cohortID": "xyz789",
"referrer": "xyz789",
"originalReferrer": "xyz789",
"sessionReferrer": "abc123",
"sessionFirstURL": "xyz789",
"deviceSessionID": "xyz789",
"argument": "abc123",
"publicArgument": "abc123",
"deviceID": "xyz789",
"eventID": 987,
"insertID": "abc123"
}
Field Name | Description |
---|---|
name - String!
|
The name of the event. |
user - User
|
The user who executed the event, if one exists. |
anonymousUserID - String!
|
The randomly generated unique user ID stored in a browser cookie. |
url - String!
|
The URL when the event was logged. |
source - EventSource!
|
The source of the event. |
argument - String
|
The additional argument information. |
version - String!
|
The Sourcegraph version when the event was logged. |
timestamp - DateTime!
|
The timestamp when the event was logged. |
Field Name | Description |
---|---|
nodes - [EventLog!]!
|
A list of event logs. |
totalCount - Int!
|
The total count of event logs in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
The unique identifier of this executor. |
hostname - String!
|
The hostname of the executor instance. |
queueName - String!
|
The queue name that the executor polls for work. |
active - Boolean!
|
Active is true, if a heartbeat from the executor has been received at most three heartbeat intervals ago. |
os - String!
|
The operating system running the executor. |
architecture - String!
|
The machine architecture running the executor. |
dockerVersion - String!
|
The version of Git used by the executor. |
executorVersion - String!
|
The version of the executor. |
gitVersion - String!
|
The version of Docker used by the executor. |
igniteVersion - String!
|
The version of Ignite used by the executor. |
srcCliVersion - String!
|
The version of src-cli used by the executor. |
firstSeenAt - DateTime!
|
The first time the executor sent a heartbeat to the Sourcegraph instance. |
lastSeenAt - DateTime!
|
The last time the executor sent a heartbeat to the Sourcegraph instance. |
compatibility - ExecutorCompatibility
|
The compatibility of the executor with respect to the Sourcegraph instance. If outdated, please make sure that the executor and the Sourcegraph backend are of compatible versions. This means they should match in major and minor version, but they may be 1 minor version apart. If too new, please update the Sourcegraph instance to match the version of the executor or downgrade the executor. Compatibility can be null if the executor or Sourcegraph instance runs in dev mode or there's a version mismatch. |
{
"id": "4",
"hostname": "abc123",
"queueName": "xyz789",
"active": false,
"os": "xyz789",
"architecture": "xyz789",
"dockerVersion": "xyz789",
"executorVersion": "abc123",
"gitVersion": "abc123",
"igniteVersion": "xyz789",
"srcCliVersion": "abc123",
"firstSeenAt": "2007-12-03T10:15:30Z",
"lastSeenAt": "2007-12-03T10:15:30Z",
"compatibility": "OUTDATED"
}
Field Name | Description |
---|---|
nodes - [Executor!]!
|
A list of executors. |
totalCount - Int!
|
The total number of executors in this result set. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
The unique identifier of the secret. |
key - String!
|
The key under which the secret is available. Secrets are usually exposed as environment variables named using this key. Recommended format: uppercase letters, numbers and underscores. |
scope - ExecutorSecretScope!
|
The scope of this secret. The secret will only be usable for jobs in this particular scope. |
overwritesGlobalSecret - Boolean!
|
If true, this secret is defined in a namespace and a secret with the same key is also defined in the global namespace, which this secret overwrites. |
namespace - Namespace
|
The namespace this secret belongs to. Null, if a global secret. Global secrets are available to every execution. |
creator - User
|
The creator of the secret. Null, if the creator has been deleted. |
createdAt - DateTime!
|
The date and time this secret has been created. |
updatedAt - DateTime!
|
The date and time this secret has been last updated. |
accessLogs - ExecutorSecretAccessLogConnection!
|
The list of access events to this secret. Every time the secret value is decoded and used, one of these entries is created. |
An access log entry for an executor secret. These are created every time the secret value is decoded.
Field Name | Description |
---|---|
id - ID!
|
The unique identifier of the log entry. |
executorSecret - ExecutorSecret!
|
The secret that this log entry belongs to. |
user - User
|
The user in which name the secret has been used. This is null when the access was not by a user account, or when the user account was deleted. |
machineUser - String!
|
True when the secret was accessed by an internal procedure. |
createdAt - DateTime!
|
The date and time when the secret has been used. |
Field Name | Description |
---|---|
nodes - [ExecutorSecretAccessLog!]!
|
A list of access logs. |
totalCount - Int!
|
The total number of records in this result set. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
nodes - [ExecutorSecret!]!
|
A list of executor secrets. |
totalCount - Int!
|
The total number of records in this result set. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
raw - String!
|
The raw JSON (or JSONC) contents of the manifest. This value may be large (because many manifests contain README and icon data), and it is JSONC (not strict JSON), which means it must be parsed with a JSON parser that supports trailing commas and comments. Consider using jsonFields instead. |
jsonFields - JSONValue!
|
The manifest as JSON (not JSONC, even if the raw manifest is JSONC) with only the specified fields. This is useful for callers that only need certain fields and want to avoid fetching a large amount of data (because many manifests contain README and icon data). |
|
Field Name | Description |
---|---|
extensions - RegistryExtensionConnection!
|
A list of extensions published in the extension registry. |
Field Name | Description |
---|---|
id - ID!
|
The unique ID for the external account. |
user - User!
|
The user on Sourcegraph. |
serviceType - String!
|
The type of the external service where the external account resides. |
serviceID - String!
|
An identifier for the external service where the external account resides. |
clientID - String!
|
An identifier for the client of the external service where the external account resides. This distinguishes among multiple authentication providers that access the same service with different parameters. |
accountID - String!
|
An identifier for the external account (typically equal to or derived from the ID on the external service). |
createdAt - DateTime!
|
The creation date of this external account on Sourcegraph. |
updatedAt - DateTime!
|
The last-updated date of this external account on Sourcegraph. |
refreshURL - String
|
A URL that, when visited, re-initiates the authentication process. |
accountData - JSONValue
|
Provider-specific data about the external account. Only site admins may query this field. |
publicAccountData - PublicExternalAccountData
|
Public provider-specific data about the external account. Only users that are linked to the external account and site admins may query this field. |
Field Name | Description |
---|---|
nodes - [ExternalAccount!]!
|
A list of external accounts. |
totalCount - Int!
|
The total count of external accounts in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
A URL to a resource on an external service, such as the URL to a repository on its external (origin) code host.
Field Name | Description |
---|---|
url - String!
|
The URL to the resource. |
serviceKind - ExternalServiceKind
|
The kind of external service, such as "GITHUB", or null if unknown/unrecognized. This is used solely for displaying an icon that represents the service. |
serviceType - String
|
The type of external service, such as "github", or null if unknown/unrecognized. This is used solely for displaying an icon that represents the service. use name serviceKind instead |
Field Name | Description |
---|---|
id - String!
|
The repository's ID on the external service. Example: For GitHub, this is the GitHub GraphQL API's node ID for the repository. |
serviceType - String!
|
The type of external service where this repository resides. Example: "github", "gitlab", etc. |
serviceID - String!
|
The particular instance of the external service where this repository resides. Its value is opaque but typically consists of the canonical base URL to the service. Example: For GitHub.com, this is "https://github.com/". |
Field Name | Description |
---|---|
id - ID!
|
The external service's unique ID. |
kind - ExternalServiceKind!
|
The kind of external service. |
displayName - String!
|
The display name of the external service. |
config - JSONCString!
|
The JSON configuration of the external service. |
createdAt - DateTime!
|
When the external service was created. |
updatedAt - DateTime!
|
When the external service was last updated. |
repoCount - Int!
|
The number of repos synced by the external service. |
webhookURL - String
|
An optional URL that will be populated when webhooks have been configured for the external service. |
warning - String
|
This is an optional field that's populated when we ran into errors on the backend side when trying to create/update an ExternalService, but the create/update still succeeded. It is a field on ExternalService instead of a separate thing in order to not break the API and stay backwards compatible. |
lastSyncError - String
|
External services are synced with code hosts in the background. This optional field will contain any errors that occurred during the most recent completed sync. |
lastSyncAt - DateTime
|
LastSyncAt is the time the last sync job was run for this code host. Null if it has never been synced so far. |
nextSyncAt - DateTime
|
The timestamp of the next sync job. Null if not scheduled for a re-sync. |
webhookLogs - WebhookLogConnection!
|
Returns recently received webhooks on this external service. Only site admins may access this field. DEPRECATED: Webhook logs linked directly to an external service will be removed. See https://docs.sourcegraph.com/admin/config/webhooks/incoming#deprecation-notice Webhook logs linked directly to an external service will be removed. See https://docs.sourcegraph.com/admin/config/webhooks/incoming#deprecation-notice |
|
|
syncJobs - ExternalServiceSyncJobConnection!
|
The list of recent sync jobs for this external service. |
|
|
checkConnection - ExternalServiceAvailability!
|
Checks the availability of the external service. |
hasConnectionCheck - Boolean!
|
True if this external service can perform availability check by running checkConnection. If this is false, then checkConnection responds with ExternalServiceAvailabilityUnknown. |
supportsRepoExclusion - Boolean!
|
True if this external service configuration supports exclude parameter. |
{
"id": "4",
"kind": "AWSCODECOMMIT",
"displayName": "abc123",
"config": JSONCString,
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"repoCount": 987,
"webhookURL": "abc123",
"warning": "xyz789",
"lastSyncError": "abc123",
"lastSyncAt": "2007-12-03T10:15:30Z",
"nextSyncAt": "2007-12-03T10:15:30Z",
"webhookLogs": WebhookLogConnection,
"syncJobs": ExternalServiceSyncJobConnection,
"checkConnection": ExternalServiceAvailable,
"hasConnectionCheck": true,
"supportsRepoExclusion": false
}
Availability status of an external service for diagnostic purposes.
This is so that the UI can surface whether the external service can serve requests, and if not, why is the reason for that.
Availability for some external services may not be determined, or only partially supported. In that case unknown variant of ExternalServiceAvailability is returned.
Field Name | Description |
---|---|
implementationNote - String!
|
User-friendly textual description of the implementation status of availability. This is expected to be tied to specific kinds of external services. |
Field Name | Description |
---|---|
lastCheckedAt - DateTime!
|
The timestamp of the last successful availability check that was performed. |
Field Name | Description |
---|---|
nodes - [ExternalService!]!
|
A list of external services. |
totalCount - Int!
|
The total number of external services in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
A namespace sourced from a defined external service (such as GitHub, GitLab, Phabricator, etc.) that can be discovered before any sync or mirror operations.
Field Name | Description |
---|---|
nodes - [ExternalServiceNamespace!]!
|
A list of namespaces available on the source. Namespaces are used to organize which members and users can access repositories and are defined by external service kind (e.g. Github organizations, Bitbucket projects, etc.) |
totalCount - Int!
|
The total number of source repos in the connection. |
FOR INTERNAL USE ONLY: A status message produced when repositories could not be synced from an external service
Field Name | Description |
---|---|
message - String!
|
The message of this status message |
externalService - ExternalService!
|
The external service that failed to sync |
An external service sync job represents one sync with the code host. It's a background job that will eventually be run by the repo syncer.
Field Name | Description |
---|---|
id - ID!
|
The unique identifier of the sync job. |
state - ExternalServiceSyncJobState!
|
The current state of the sync job. |
queuedAt - DateTime!
|
When the sync job was added to the queue. |
startedAt - DateTime
|
Set when sync begins. |
finishedAt - DateTime
|
Set when sync finished. |
failureMessage - String
|
Error message, if the sync failed. |
reposSynced - Int!
|
The number of repos synced during this sync job. |
repoSyncErrors - Int!
|
The number of times an error occurred syncing a repo during this sync job. |
reposAdded - Int!
|
The number of new repos discovered during this sync job. |
reposDeleted - Int!
|
The number of repos deleted as a result of this sync job. |
reposModified - Int!
|
The number of existing repos whose metadata has changed during this sync job. |
reposUnmodified - Int!
|
The number of existing repos whose metadata did not change during this sync job. |
{
"id": 4,
"state": "QUEUED",
"queuedAt": "2007-12-03T10:15:30Z",
"startedAt": "2007-12-03T10:15:30Z",
"finishedAt": "2007-12-03T10:15:30Z",
"failureMessage": "abc123",
"reposSynced": 987,
"repoSyncErrors": 987,
"reposAdded": 123,
"reposDeleted": 123,
"reposModified": 987,
"reposUnmodified": 123
}
Field Name | Description |
---|---|
nodes - [ExternalServiceSyncJob!]!
|
A list of sync jobs. |
totalCount - Int!
|
The total number of jobs in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Enum Value | Description |
---|---|
|
Not yet started. Will be picked up by a worker eventually. |
|
Currently syncing. |
|
An error occurred while syncing. Will be retried eventually. |
|
A fatal error occurred while syncing. No retries will be made. |
|
Sync finished successfully. |
|
Sync job is being canceled. |
|
Sync job has been canceled. |
Union Types |
---|
Field Name | Description |
---|---|
name - String!
|
The name of the feature flag |
value - Boolean!
|
The static value of the feature flag |
overrides - [FeatureFlagOverride!]!
|
Overrides that apply to the feature flag |
A feature flag override is an override of a feature flag's value for a specific org or user
Field Name | Description |
---|---|
id - ID!
|
A unique ID for this feature flag override |
namespace - Namespace!
|
The namespace for this override. Will always be a user or org. |
targetFlag - FeatureFlag!
|
The name of the feature flag being overridden |
value - Boolean!
|
The overridden value of the feature flag |
Field Name | Description |
---|---|
name - String!
|
The name of the feature flag |
rolloutBasisPoints - Int!
|
The ratio of users that will be assigned this this feature flag, expressed in basis points (0.01%). |
overrides - [FeatureFlagOverride!]!
|
Overrides that apply to the feature flag |
File is temporarily preserved for backcompat with browser extension search API client code.
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the repository root) of this file. |
name - String!
|
The base name (i.e., file name only) of this file's path. |
isDirectory - Boolean!
|
Whether this is a directory. |
url - String!
|
The URL to this file on Sourcegraph. |
repository - Repository!
|
The repository that contains this file. |
A file. In a future version of Sourcegraph, a repository's files may be distinct from a repository's blobs (for example, to support searching/browsing generated files that aren't committed and don't exist as Git blobs). Clients should generally use the GitBlob concrete type and GitCommit.blobs (not GitCommit.files), unless they explicitly want to opt-in to different behavior in the future. INTERNAL: This is temporarily named File2 during a migration. Do not refer to the name File2 in any API clients as the name will change soon.
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the root) of this file. |
name - String!
|
The base name (i.e., file name only) of this file. |
isDirectory - Boolean!
|
False because this is a file, not a directory. |
content - String!
|
The content of this file. |
byteSize - Int!
|
The file size in bytes. |
totalLines - Int!
|
Total line count for the file. Returns 0 for binary files. |
binary - Boolean!
|
Whether or not it is binary. |
richHTML - String!
|
The file rendered as rich HTML, or an empty string if it is not a supported rich file type. This HTML string is already escaped and thus is always safe to render. |
url - String!
|
The URL to this file (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this file (using an immutable revision specifier). |
externalURLs - [ExternalLink!]!
|
The URLs to this file on external services. |
highlight - HighlightedFile!
|
Highlight the file. |
|
File2 Types |
---|
Field Name | Description |
---|---|
oldPath - String
|
The old (original) path of the file, or null if the file was added. |
oldFile - File2
|
The old file, or null if the file was created (oldFile.path == oldPath). |
newPath - String
|
The new (changed) path of the file, or null if the file was deleted. |
newFile - File2
|
The new file, or null if the file was deleted (newFile.path == newPath). |
mostRelevantFile - File2!
|
The old file (if the file was deleted) and otherwise the new file. This file field is typically used by clients that want to show a "View" link to the file. |
hunks - [FileDiffHunk!]!
|
Hunks that were changed from old to new. |
stat - DiffStat!
|
The diff stat for the whole file. |
internalID - String!
|
FOR INTERNAL USE ONLY. An identifier for the file diff that is unique among all other file diffs in the list that contains it. |
Field Name | Description |
---|---|
nodes - [FileDiff!]!
|
A list of file diffs. |
totalCount - Int
|
The total count of file diffs in the connection, if available. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
diffStat - DiffStat!
|
The diff stat for the file diffs in this object, which may be a subset of the entire diff if the result is paginated. |
rawDiff - String!
|
The raw diff for the file diffs in this object, which may be a subset of the entire diff if the result is paginated. |
Field Name | Description |
---|---|
oldRange - FileDiffHunkRange!
|
The range of the old file that the hunk applies to. |
oldNoNewlineAt - Boolean!
|
Whether the old file had a trailing newline. |
newRange - FileDiffHunkRange!
|
The range of the new file that the hunk applies to. |
section - String
|
The diff hunk section heading, if any. |
body - String!
|
The hunk body, with lines prefixed with '-', '+', or ' '. |
highlight - HighlightedDiffHunkBody!
|
Highlight the hunk. |
|
Field Name | Description |
---|---|
file - GitBlob!
|
The file containing the match. KNOWN ISSUE: This file's "commit" field contains incomplete data. KNOWN ISSUE: This field's type should be File! not GitBlob!. |
repository - Repository!
|
The repository containing the file match. |
revSpec - GitRevSpec
|
The revspec of the revision that contains this match. If no revspec was given (such as when no repository filter or revspec is specified in the search query), it is null. |
symbols - [Symbol!]!
|
The symbols found in this file that match the query. |
lineMatches - [LineMatch!]!
|
The line matches. |
chunkMatches - [ChunkMatch!]!
|
EXPERIMENTAL: This field is experimental and may be unstable. The chunk matches. |
limitHit - Boolean!
|
Whether or not the limit was hit. |
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
A search result. Every type of search result, except FileMatch, must implement this interface.
Field Name | Description |
---|---|
label - Markdown!
|
A markdown string that is rendered prominently. |
url - String!
|
The URL of the result. |
detail - Markdown!
|
A markdown string that is rendered less prominently. |
matches - [SearchResultMatch!]!
|
A list of matches in this search result. |
GenericSearchResultInterface Types |
---|
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the repository root) of this blob. |
name - String!
|
The base name (i.e., file name only) of this blob's path. |
isDirectory - Boolean!
|
False because this is a blob (file), not a directory. |
content - String!
|
The content of this blob. |
byteSize - Int!
|
The file size in bytes. |
totalLines - Int!
|
Total line count for the Blob. Returns 0 for binary files. |
binary - Boolean!
|
Whether or not it is binary. |
richHTML - String!
|
The blob contents rendered as rich HTML, or an empty string if it is not a supported rich file type. This HTML string is already escaped and thus is always safe to render. |
commit - GitCommit!
|
The Git commit containing this blob. |
repository - Repository!
|
The repository containing this Git blob. |
url - String!
|
The URL to this blob (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this blob (using an immutable revision specifier). |
externalURLs - [ExternalLink!]!
|
The URLs to this blob on its repository's external services. |
blame - [Hunk!]!
|
Blame the blob. |
highlight - HighlightedFile!
|
Highlight the blob contents. |
|
|
submodule - Submodule
|
Submodule metadata if this tree points to a submodule |
symbols - SymbolConnection!
|
Symbols defined in this blob. |
symbol - Symbol
|
(Experimental) Symbol defined in this blob at the specific line number and character offset. |
isSingleChild - Boolean!
|
Always false, since a blob is a file, not directory. |
lfs - LFS
|
LFS is set if the GitBlob is a pointer to a file stored in LFS. |
{
"path": "xyz789",
"name": "xyz789",
"isDirectory": true,
"content": "xyz789",
"byteSize": 123,
"totalLines": 123,
"binary": true,
"richHTML": "xyz789",
"commit": GitCommit,
"repository": Repository,
"url": "abc123",
"canonicalURL": "xyz789",
"externalURLs": [ExternalLink],
"blame": [Hunk],
"highlight": HighlightedFile,
"submodule": Submodule,
"symbols": SymbolConnection,
"symbol": Symbol,
"isSingleChild": false,
"lfs": LFS
}
Field Name | Description |
---|---|
id - ID!
|
The globally addressable ID for this commit. |
repository - Repository!
|
The repository that contains this commit. |
oid - GitObjectID!
|
This commit's Git object ID (OID), a 40-character SHA-1 hash. |
abbreviatedOID - String!
|
The abbreviated form of this commit's OID. |
author - Signature!
|
This commit's author. |
committer - Signature
|
This commit's committer, if any. |
message - String!
|
The full commit message. |
subject - String!
|
The first line of the commit message. |
body - String
|
The contents of the commit message after the first line. |
parents - [GitCommit!]!
|
Parent commits of this commit. |
url - String!
|
The URL to this commit (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this commit (using an immutable revision specifier). |
externalURLs - [ExternalLink!]!
|
The URLs to this commit on its repository's external services. |
path - GitTreeOrBlob
|
The Git tree or blob in this commit at the given path. |
|
|
tree - GitTree
|
The Git tree in this commit at the given path. |
fileNames - [String!]!
|
A list of file names in this repository. |
blob - GitBlob
|
The Git blob in this commit at the given path. |
|
|
file - File2
|
The file at the given path for this commit. See "File" documentation for the difference between this field and the "blob" field. |
|
|
languages - [String!]!
|
Lists the programming languages present in the tree at this commit. |
languageStatistics - [LanguageStatistics!]!
|
List statistics for each language present in the repository. |
ancestors - GitCommitConnection!
|
The log of commits consisting of this commit and its ancestors. |
|
|
behindAhead - BehindAheadCounts!
|
Returns the number of commits that this commit is behind and ahead of revspec. |
|
|
symbols - SymbolConnection!
|
Symbols defined as of this commit. (All symbols, not just symbols that were newly defined in this commit.) |
diff - RepositoryComparison!
|
Returns the comparison with another revision. |
|
{
"id": 4,
"repository": Repository,
"oid": GitObjectID,
"abbreviatedOID": "xyz789",
"author": Signature,
"committer": Signature,
"message": "abc123",
"subject": "xyz789",
"body": "abc123",
"parents": [GitCommit],
"url": "abc123",
"canonicalURL": "abc123",
"externalURLs": [ExternalLink],
"path": GitTree,
"tree": GitTree,
"fileNames": ["abc123"],
"blob": GitBlob,
"file": File2,
"languages": ["abc123"],
"languageStatistics": [LanguageStatistics],
"ancestors": GitCommitConnection,
"behindAhead": BehindAheadCounts,
"symbols": SymbolConnection,
"diff": RepositoryComparison
}
Field Name | Description |
---|---|
nodes - [GitCommit!]!
|
A list of Git commits. |
totalCount - Int
|
The total number of Git commits in the connection. If the GitCommitConnection is paginated (e.g., because a "first" parameter was provided to the field that produced it), this field is null to avoid it taking unexpectedly long to compute the total count. Remove the pagination parameters to obtain a non-null value for this field. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
oid - GitObjectID!
|
This object's OID. |
abbreviatedOID - String!
|
The abbreviated form of this object's OID. |
commit - GitCommit
|
The commit object, if it is a commit and it exists; otherwise null. |
type - GitObjectType!
|
The Git object's type. |
Field Name | Description |
---|---|
id - ID!
|
The globally addressable ID for the Git ref. |
name - String!
|
The full ref name (e.g., "refs/heads/mybranch" or "refs/tags/mytag"). |
abbrevName - String!
|
An unambiguous short name for the ref. |
displayName - String!
|
The display name of the ref. For branches ("refs/heads/foo"), this is the branch name ("foo"). As a special case, for GitHub pull request refs of the form refs/pull/NUMBER/head, this is "NUMBER". |
prefix - String!
|
The prefix of the ref, either "", "refs/", "refs/heads/", "refs/pull/", or "refs/tags/". This prefix is always a prefix of the ref's name. |
type - GitRefType!
|
The type of this Git ref. |
target - GitObject!
|
The object that the ref points to. |
repository - Repository!
|
The associated repository. |
url - String!
|
The URL to this Git ref. |
Field Name | Description |
---|---|
nodes - [GitRef!]!
|
A list of Git refs. |
totalCount - Int!
|
The total count of Git refs in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - PageInfo!
|
Pagination information. |
Union Types |
---|
A Git revision range of the form "base..head" or "base...head". Other revision range formats are not supported.
Field Name | Description |
---|---|
expr - String!
|
The Git revision range expression of the form "base..head" or "base...head". |
base - GitRevSpec!
|
The base (left-hand side) of the range. |
baseRevSpec - GitRevSpecExpr!
|
The base's revspec as an expression. |
head - GitRevSpec!
|
The head (right-hand side) of the range. |
headRevSpec - GitRevSpecExpr!
|
The head's revspec as an expression. |
mergeBase - GitObject
|
The merge-base of the base and head revisions, if this is a "base...head" revision range. If this is a "base..head" revision range, then this field is null. |
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the root) of this tree. |
isRoot - Boolean!
|
Whether this tree is the root (top-level) tree. |
name - String!
|
The base name (i.e., last path component only) of this tree. |
isDirectory - Boolean!
|
True because this is a directory. (The value differs for other TreeEntry interface implementations, such as File.) |
commit - GitCommit!
|
The Git commit containing this tree. |
repository - Repository!
|
The repository containing this tree. |
url - String!
|
The URL to this tree (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this tree (using an immutable revision specifier). |
externalURLs - [ExternalLink!]!
|
The URLs to this tree on external services. |
rawZipArchiveURL - String!
|
The URL to this entry's raw contents as a Zip archive. |
submodule - Submodule
|
Submodule metadata if this tree points to a submodule |
directories - [GitTree!]!
|
A list of directories in this tree. |
files - [File!]!
|
A list of files in this tree. |
entries - [TreeEntry!]!
|
A list of entries in this tree. |
|
|
symbols - SymbolConnection!
|
Symbols defined in this tree. |
isSingleChild - Boolean!
|
Whether this tree entry is a single child |
{
"path": "abc123",
"isRoot": true,
"name": "abc123",
"isDirectory": false,
"commit": GitCommit,
"repository": Repository,
"url": "xyz789",
"canonicalURL": "abc123",
"externalURLs": [ExternalLink],
"rawZipArchiveURL": "xyz789",
"submodule": Submodule,
"directories": [GitTree],
"files": [File],
"entries": [TreeEntry],
"symbols": SymbolConnection,
"isSingleChild": true
}
FOR INTERNAL USE ONLY: A status message produced when disableAutoGitUpdates is set to true in the site configuration
Field Name | Description |
---|---|
message - String!
|
The message of this status message |
Field Name | Description |
---|---|
name - String!
|
The header name |
values - [String!]!
|
Can be multiple values |
Input Field | Description |
---|---|
startLine - Int!
|
The first line to fetch (0-indexed, inclusive). Values outside the bounds of the file will automatically be clamped within the valid range. |
endLine - Int!
|
The last line to fetch (0-indexed, inclusive). Values outside the bounds of the file will automatically be clamped within the valid range. |
Field Name | Description |
---|---|
aborted - Boolean!
|
Whether highlighting was aborted. |
lines - [HighlightedDiffHunkLine!]!
|
The highlighted lines. |
Field Name | Description |
---|---|
html - String!
|
The HTML containing the syntax-highlighted line of code. |
kind - DiffHunkLineType!
|
The operation that happened on this line, in patches it is prefixed with '+', '-', ' '. Can be either add, delete, or no change. |
Field Name | Description |
---|---|
aborted - Boolean!
|
Whether or not it was aborted. |
html - String!
|
The HTML table that can be used to display the highlighted file. |
lsif - String!
|
Base64 encoded JSON payload of LSIF Typed with syntax highlighting data. |
lineRanges - [String!]!
|
A list of the desired line ranges. Each list is a list of lines, where each element is an HTML table row '...' string. This is useful if you only need to display specific subsets of the file. |
|
Field Name | Description |
---|---|
value - String!
|
The full contents of the string. |
highlights - [Highlight!]!
|
Highlighted matches of the query in the preview string. |
Field Name | Description |
---|---|
startLine - Int!
|
The startLine. |
endLine - Int!
|
The endLine. |
startByte - Int!
|
The startByte. |
endByte - Int!
|
The endByte. |
rev - String!
|
The rev. |
author - Signature!
|
The author. |
message - String!
|
The message. |
commit - GitCommit!
|
The commit that contains the hunk. |
filename - String!
|
The original filename at the commit. Use this filename if you're reading the text contents of the file at the commit field of this hunk. The file may have been renamed after the commit so name of file where this hunk got computed may not exist. |
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
FOR INTERNAL USE ONLY: A status message produced when repositories are being indexed for search.
Field Name | Description |
---|---|
sentInvitationEmail - Boolean!
|
Whether an invitation email was sent. If emails are not enabled on this site or if the user has no verified email address, an email will not be sent. |
invitationURL - String!
|
The URL that the invited user can visit to accept or reject the invitation. |
A segment of a key path that locates a nested JSON value in a root JSON value. Exactly one field in each KeyPathSegment must be non-null. For example, in {"a": [0, {"b": 3}]}, the value 3 is located at the key path ["a", 1, "b"].
Field Name | Description |
---|---|
byteSize - BigInt!
|
The size of the file in LFS in bytes. Note: the file size in the GitBlob will be the size of the pointer not the file a user checks out. |
Field Name | Description |
---|---|
preview - String!
|
The preview. |
lineNumber - Int!
|
The line number. 0-based. The first line will have lineNumber 0. Note: A UI will normally display line numbers 1-based. |
offsetAndLengths - [Int!]!
|
Tuples of [offset, length] measured in characters (not bytes). |
limitHit - Boolean!
|
Whether or not the limit was hit. will always be false |
Field Name | Description |
---|---|
resource - CodeIntelGitBlob!
|
The file that this location refers to. |
range - Range
|
The range inside the file that this location refers to. |
url - String!
|
The URL to this location (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this location (using an immutable revision specifier). |
Input Field | Description |
---|---|
alwaysNil - String
|
A dummy null value (empty input types are not allowed yet). |
Information and status about the mirroring of a repository. In this case, the remote source repository is external to Sourcegraph and the mirror is maintained by the Sourcegraph site (not the other way around).
Field Name | Description |
---|---|
remoteURL - String!
|
The URL of the remote source repository. |
cloneInProgress - Boolean!
|
Whether the clone of the repository has begun but not yet completed. |
cloneProgress - String
|
A single line of text that contains progress information for the running clone command. The format of the progress text is not specified. It is intended to be displayed directly to a user. e.g. "Receiving objects: 95% (2041/2148), 292.01 KiB | 515.00 KiB/s" "Resolving deltas: 9% (117/1263)" |
cloned - Boolean!
|
Whether the repository has ever been successfully cloned. |
isCorrupted - Boolean!
|
Whether the repository is currently corrupt. |
corruptionLogs - [RepoCorruptionLog!]!
|
A Log of the corruption events that have been detected on this repository. Only 10 events are kept and the events are ordered from most recent to least. |
updatedAt - DateTime
|
When the repository was last successfully updated from the remote source repository.. |
updateSchedule - UpdateSchedule
|
The state of this repository in the update schedule. |
updateQueue - UpdateQueue
|
The state of this repository in the update queue. |
lastError - String
|
The last error message, if any, returned when fetching or cloning the repo |
byteSize - BigInt!
|
The byte size of the repo. |
shard - String
|
The gitserver shard on which the repository is or will be cloned. Only site admins can access this field. |
{
"remoteURL": "abc123",
"cloneInProgress": false,
"cloneProgress": "abc123",
"cloned": true,
"isCorrupted": false,
"corruptionLogs": [RepoCorruptionLog],
"updatedAt": "2007-12-03T10:15:30Z",
"updateSchedule": UpdateSchedule,
"updateQueue": UpdateQueue,
"lastError": "xyz789",
"byteSize": {},
"shard": "abc123"
}
A high-level monitoring alert, for details see https://docs.sourcegraph.com/admin/observability/metrics#high-level-alerting-metrics
Field Name | Description |
---|---|
timestamp - DateTime!
|
End time of this event, which describes the past 12h of recorded data. |
name - String!
|
Name of alert that the service fired. |
serviceName - String!
|
Name of the service that fired the alert. |
owner - String!
|
Owner of the fired alert. |
average - Float!
|
Average percentage of time (between [0, 1]) that the event was firing over the 12h of recorded data. e.g. 1.0 if it was firing 100% of the time on average during that 12h window, 0.5 if it was firing 50% of the time on average, etc. |
Field Name | Description |
---|---|
alerts - [MonitoringAlert!]!
|
Alerts fired in this time span. No longer supported, and will no longer return data - query will be removed after Sourcegraph 4.5 |
A namespace is a container for certain types of data and settings, such as a user or organization.
A list of repositories.
The old RepositoryConnection
is deprecated and is replaced by this new connection which support proper cursor based pagination. The new connection does not include precise
argument for totalCount.
Field Name | Description |
---|---|
nodes - [Repository!]!
|
A list of repositories. |
totalCount - Int!
|
The total count of repositories in the connection. |
pageInfo - ConnectionPageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
nodes - [User!]!
|
A list of users. |
totalCount - Int!
|
The total number of users in the connection. |
pageInfo - ConnectionPageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
The ID of the node. |
Node Types |
---|
Field Name | Description |
---|---|
executorSecrets - ExecutorSecretConnection!
|
The list of all available executor secrets for execution in this orgs namespace. |
|
|
id - ID!
|
The unique ID for the organization. |
name - String!
|
The organization's name. This is unique among all organizations on this Sourcegraph site. |
displayName - String
|
The organization's chosen display name. |
createdAt - DateTime!
|
The date when the organization was created. |
members - NewUsersConnection!
|
A list of users who are members of this organization. |
|
|
latestSettings - Settings
|
The latest settings for the organization. Only organization members and site admins can access this field. |
settingsCascade - SettingsCascade!
|
All settings for this organization, and the individual levels in the settings cascade (global > organization) that were merged to produce the final merged settings. Only organization members and site admins can access this field. |
configurationCascade - ConfigurationCascade!
|
DEPRECATED Use settingsCascade instead. This field is a deprecated alias for it and will be removed in a future release. |
viewerPendingInvitation - OrganizationInvitation
|
DEPRECATED A pending invitation for the viewer to join this organization, if any. Use invitationByToken operation instead. This field is deprecated and will be removed in a future release. |
viewerCanAdminister - Boolean!
|
Whether the viewer has admin privileges on this organization. Currently, all of an organization's members have admin privileges on the organization. |
viewerIsMember - Boolean!
|
Whether the viewer is a member of this organization. |
url - String!
|
The URL to the organization. |
settingsURL - String
|
The URL to the organization's settings. |
namespaceName - String!
|
The name of this user namespace's component. For organizations, this is the organization's name. |
{
"executorSecrets": ExecutorSecretConnection,
"id": "4",
"name": "abc123",
"displayName": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"members": NewUsersConnection,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"viewerPendingInvitation": OrganizationInvitation,
"viewerCanAdminister": true,
"viewerIsMember": false,
"url": "xyz789",
"settingsURL": "abc123",
"namespaceName": "xyz789"
}
Field Name | Description |
---|---|
id - ID!
|
The ID of the invitation. |
organization - Org!
|
The organization that the invitation is for. |
sender - User!
|
The user who sent the invitation. |
recipient - User
|
The user who received the invitation. |
recipientEmail - String
|
The email address that the invitation was sent to. |
createdAt - DateTime!
|
The date when this invitation was created. |
notifiedAt - DateTime
|
The most recent date when a notification was sent to the recipient about this invitation. |
respondedAt - DateTime
|
The date when this invitation was responded to by the recipient. |
responseType - OrganizationInvitationResponseType
|
The recipient's response to this invitation, or no response (null). |
respondURL - String
|
The URL where the recipient can respond to the invitation when pending, or null if not pending. |
revokedAt - DateTime
|
The date when this invitation was revoked. |
expiresAt - DateTime
|
The date when this invitation is going to expire. |
isVerifiedEmail - Boolean
|
Boolean flag which returns true if the email on the invite matches a verified email of the user |
{
"id": "4",
"organization": Org,
"sender": User,
"recipient": User,
"recipientEmail": "xyz789",
"createdAt": "2007-12-03T10:15:30Z",
"notifiedAt": "2007-12-03T10:15:30Z",
"respondedAt": "2007-12-03T10:15:30Z",
"responseType": "ACCEPT",
"respondURL": "xyz789",
"revokedAt": "2007-12-03T10:15:30Z",
"expiresAt": "2007-12-03T10:15:30Z",
"isVerifiedEmail": true
}
Field Name | Description |
---|---|
nodes - [OrganizationMembership!]!
|
A list of organization memberships. |
totalCount - Int!
|
The total count of organization memberships in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
An out-of-band migration is a process that runs in the background of the instance that moves data from one format into another format. Out-of-band migrations
Field Name | Description |
---|---|
id - ID!
|
The unique identifier of this migration. |
team - String!
|
The team that owns this migration (e.g., code-intelligence). |
component - String!
|
The component this migration affects (e.g., codeintel-db.lsif_data_documents). |
description - String!
|
A human-readable summary of the migration. |
introduced - String!
|
The Sourcegraph version in which this migration was introduced. The format of this version includes only major and minor parts separated by a dot. The patch version can always be assumed to be zero as we'll never introduce or deprecate an out-of-band migration within a patch release. It is necessary to completely this migration in reverse (if destructive) before downgrading to or past this version. Otherwise, the previous instance version will not be aware of the new data format. |
deprecated - String
|
The Sourcegraph version by which this migration is assumed to have completed. The format of this version mirrors introduced and includes only major and minor parts separated by a dot. It is necessary to have completed this migration before upgrading to or past this version. Otherwise, the next instance version will no longer be aware of the old data format. |
progress - Float!
|
The progress of the migration (in the forward direction). In the range [0, 1]. |
created - DateTime!
|
The time the migration record was inserted. |
lastUpdated - DateTime
|
The last time the migration progress or error list was updated. |
nonDestructive - Boolean!
|
If false, the migration moves data destructively, and a previous version of Sourcegraph will encounter errors when interfacing with the target data unless the migration is first run in reverse prior to a downgrade. |
applyReverse - Boolean!
|
If true, the migration will run in reverse. |
errors - [OutOfBandMigrationError!]!
|
A list of errors that have occurred while performing this migration (in either direction). This list is bounded by a maximum size, and older errors will replaced by newer errors as the list capacity is reached. |
{
"id": 4,
"team": "xyz789",
"component": "xyz789",
"description": "abc123",
"introduced": "abc123",
"deprecated": "xyz789",
"progress": 987.65,
"created": "2007-12-03T10:15:30Z",
"lastUpdated": "2007-12-03T10:15:30Z",
"nonDestructive": false,
"applyReverse": false,
"errors": [OutOfBandMigrationError]
}
Field Name | Description |
---|---|
id - ID!
|
The request log item ID. |
startedAt - DateTime!
|
The time the request was sent at. |
method - String!
|
The method used in the HTTP request. E.g. GET, POST, etc. |
url - String!
|
The full URL the request was sent to. |
requestHeaders - [HTTPHeader!]!
|
The headers sent with the HTTP request. |
requestBody - String!
|
The body content of the HTTP message. |
statusCode - Int!
|
The HTTP status code received. |
responseHeaders - [HTTPHeader!]!
|
The headers received with the HTTP response. |
durationMs - Int!
|
The total time the request took to complete, in milliseconds. |
errorMessage - String!
|
Any error message got from the request Doer in case of an error, otherwise an empty string. |
creationStackFrame - String!
|
Stack information to figure out where the ExternalClientFactory was created. |
callStack - String!
|
Stack information to figure out where in the code base the request was initiated. |
{
"id": 4,
"startedAt": "2007-12-03T10:15:30Z",
"method": "abc123",
"url": "abc123",
"requestHeaders": [HTTPHeader],
"requestBody": "abc123",
"statusCode": 987,
"responseHeaders": [HTTPHeader],
"durationMs": 123,
"errorMessage": "abc123",
"creationStackFrame": "xyz789",
"callStack": "abc123"
}
Field Name | Description |
---|---|
nodes - [OutboundRequest!]!
|
A list of outbound requests. |
totalCount - Int!
|
The total number of outbound request log items in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
A unique ID for the package repo reference. |
scheme - PackageRepoReferenceKind!
|
The ecosystem/package-manager/indexer scheme under which this package repo reference is uniquely identified e.g. npm/python/rust-analyzer |
name - String!
|
The name of the package, in a format relevant to the specific ecosystem e.g. maven artifact coordinates (com.sample:text), npm scoped packages (@monkeys/banana). |
versions - [PackageRepoReferenceVersion!]!
|
The versions of this package known to the sourcegraph instance. |
repository - Repository
|
The synthetic repository (aka the package repo) created to store the contents of the synced versions of the package repo reference. This type is subject to change once package repos and other non-git code hosts become first-class. |
Field Name | Description |
---|---|
nodes - [PackageRepoReference!]!
|
A list of package repo references. |
totalCount - Int!
|
The total number of package repo references in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Pagination information for forward-only pagination. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.
Field Name | Description |
---|---|
url - String!
|
Sourcegraph instance URL. |
Field Name | Description |
---|---|
name - String!
|
The canonical repo name (e.g. "github.com/gorilla/mux"). |
uri - String!
|
An alias for name. use name instead |
callsign - String!
|
The unique Phabricator identifier for the repo, like "MUX" |
url - String!
|
The URL to the phabricator instance (e.g. http://phabricator.sgdev.org) |
Information about this site's product license (which activates certain Sourcegraph features).
Field Name | Description |
---|---|
productNameWithBrand - String!
|
The full name of the product that this license is for. To get the product name for the current Sourcegraph site, use ProductSubscriptionStatus.productNameWithBrand instead (to handle cases where there is no license). |
tags - [String!]!
|
Tags indicating the product plan and features activated by this license. |
userCount - Int!
|
The number of users allowed by this license. |
expiresAt - DateTime!
|
The date when this license expires. |
Information about this site's product subscription (which enables access to and renewals of a product license).
Field Name | Description |
---|---|
productNameWithBrand - String!
|
The full name of the product in use, such as "Sourcegraph Enterprise". |
actualUserCount - Int!
|
The max number of user accounts that have been active on this Sourcegraph site for the current license. If no license is in use, returns zero. |
actualUserCountDate - String!
|
The date and time when the max number of user accounts that have been active on this Sourcegraph site for the current license was reached. If no license is in use, returns an empty string. |
maximumAllowedUserCount - Int
|
The number of users allowed. If there is a license, this is equal to ProductLicenseInfo.userCount. Otherwise, it is the user limit for instances without a license, or null if there is no limit. |
noLicenseWarningUserCount - Int
|
The number of free users allowed on a site without a license before a warning is shown to all users, or null if a valid license is in use. |
license - ProductLicenseInfo
|
The product license associated with this subscription, if any. |
Field Name | Description |
---|---|
resetPasswordURL - String
|
The reset password URL that the user must visit to sign into their account again. If the builtin username-password authentication provider is not enabled, this field's value is null. If email sending (SMTP) is configured on this instance, an email containing this URL will also be sent to the primary email address associated with the user. |
emailSent - Boolean!
|
If true, then an email with the password reset URL was sent to the primary email address associated with the user. If false, email sending (SMTP) might not be configured on this instance, or an error may have occurred - check the error logs with log scope 'randomizeUserPassword' for more details. |
Field Name | Description |
---|---|
url - String!
|
The URL of the other Sourcegraph instance. |
Field Name | Description |
---|---|
id - ID!
|
The unique, opaque, permanent ID of the extension. Do not display this ID to the user; display RegistryExtension.extensionID instead (it is friendlier and still unique, but it can be renamed). |
extensionID - String!
|
The qualified, unique name that refers to this extension, consisting of the registry name (if non-default), publisher's name, and the extension's name, all joined by "/" (for example, "acme-corp/my-extension-name"). |
manifest - ExtensionManifest
|
The extension manifest, or null if none is set. |
Field Name | Description |
---|---|
nodes - [RegistryExtension!]!
|
A list of registry extensions. |
A corruption log entry that that records the time of when corruption was detected and a reason why the repo is regarded as corrupt
A repository is a Git source control repository that is mirrored from some origin code host.
Field Name | Description |
---|---|
id - ID!
|
The repository's unique ID. |
name - String!
|
The repository's name, as a path with one or more components. It conventionally consists of the repository's hostname and path (joined by "/"), minus any suffixes (such as ".git"). Examples:
|
uri - String!
|
DEPRECATED: Use name. Use name. |
description - String!
|
The repository's description. |
language - String!
|
The primary programming language in the repository. |
createdAt - DateTime!
|
DEPRECATED: This field is unused in known clients. The date when this repository was created on Sourcegraph. |
updatedAt - DateTime
|
DEPRECATED: This field is unused in known clients. The date when this repository's metadata was last updated on Sourcegraph. |
commit - GitCommit
|
Returns information about the given commit in the repository, or null if no commit exists with the given rev. |
|
|
firstEverCommit - GitCommit
|
The first commit inside the repo |
mirrorInfo - MirrorRepositoryInfo!
|
Information and status related to mirroring, if this repository is a mirror of another repository (e.g., on some code host). In this case, the remote source repository is external to Sourcegraph and the mirror is maintained by the Sourcegraph site (not the other way around). |
externalRepository - ExternalRepository!
|
Information about this repository from the external service that it originates from (such as GitHub, GitLab, Phabricator, etc.). |
isFork - Boolean!
|
Whether the repository is a fork. |
isArchived - Boolean!
|
Whether the repository has been archived. |
isPrivate - Boolean!
|
Whether the repository is private. |
externalServices - ExternalServiceConnection!
|
Lists all external services which yield this repository. |
|
|
cloneInProgress - Boolean!
|
Whether the repository is currently being cloned. use Repository.mirrorInfo.cloneInProgress instead |
textSearchIndex - RepositoryTextSearchIndex
|
Information about the text search index for this repository, or null if text search indexing is not enabled or supported for this repository. |
url - String!
|
The URL to this repository. |
externalURLs - [ExternalLink!]!
|
The URLs to this repository on external services associated with it. |
defaultBranch - GitRef
|
The repository's default Git branch (HEAD symbolic ref). If the repository is currently being cloned or is empty, this field will be null. |
gitRefs - GitRefConnection!
|
The repository's Git refs. |
|
|
branches - GitRefConnection!
|
The repository's Git branches. |
|
|
tags - GitRefConnection!
|
The repository's Git tags. |
comparison - RepositoryComparison!
|
A Git comparison in this repository between a base and head commit. |
contributors - RepositoryContributorConnection!
|
The repository's contributors. |
|
|
viewerCanAdminister - Boolean!
|
Whether the viewer has admin privileges on this repository. |
label - Markdown!
|
A markdown string that is rendered prominently. |
detail - Markdown!
|
A markdown string of that is rendered less prominently. |
matches - [SearchResultMatch!]!
|
The result previews of the result. |
codeIntelligenceCommitGraph - CodeIntelligenceCommitGraph!
|
Information and status related to the commit graph of this repository calculated for use by code intelligence features. |
stars - Int!
|
The star count the repository has in the code host. |
keyValuePairs - [KeyValuePair!]!
|
A set of user-defined key-value pairs associated with the repo. |
diskSizeBytes - BigInt
|
The size of repo when cloned on disk |
{
"id": 4,
"name": "abc123",
"uri": "xyz789",
"description": "abc123",
"language": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"commit": GitCommit,
"firstEverCommit": GitCommit,
"mirrorInfo": MirrorRepositoryInfo,
"externalRepository": ExternalRepository,
"isFork": true,
"isArchived": true,
"isPrivate": false,
"externalServices": ExternalServiceConnection,
"cloneInProgress": false,
"textSearchIndex": RepositoryTextSearchIndex,
"url": "xyz789",
"externalURLs": [ExternalLink],
"defaultBranch": GitRef,
"gitRefs": GitRefConnection,
"branches": GitRefConnection,
"tags": GitRefConnection,
"comparison": RepositoryComparison,
"contributors": RepositoryContributorConnection,
"viewerCanAdminister": false,
"label": Markdown,
"detail": Markdown,
"matches": [SearchResultMatch],
"codeIntelligenceCommitGraph": CodeIntelligenceCommitGraph,
"stars": 123,
"keyValuePairs": [KeyValuePair],
"diskSizeBytes": {}
}
Field Name | Description |
---|---|
baseRepository - Repository!
|
The repository that is the base (left-hand side) of this comparison. |
headRepository - Repository!
|
The repository that is the head (right-hand side) of this comparison. Cross-repository comparisons are not yet supported, so this is always equal to RepositoryComparison.baseRepository. |
range - GitRevisionRange!
|
The range that this comparison represents. |
commits - GitCommitConnection!
|
The commits in the comparison range, excluding the base and including the head. |
fileDiffs - FileDiffConnection!
|
The file diffs for each changed file. |
Field Name | Description |
---|---|
person - Person!
|
The personal information for the contributor. |
count - Int!
|
The number of contributions made by this contributor. |
repository - Repository!
|
The repository in which the contributions occurred. |
commits - GitCommitConnection!
|
Commits by the contributor. |
|
Field Name | Description |
---|---|
nodes - [RepositoryContributor!]!
|
A list of contributors to a repository. |
totalCount - Int!
|
The total count of contributors in the connection, if available. This total count may be larger than the number of nodes in this object when the result is paginated. |
pageInfo - BidirectionalPageInfo!
|
Pagination information. |
A repository or a link to another Sourcegraph instance location where this repository may be located.
Union Types |
---|
Field Name | Description |
---|---|
gitDirBytes - BigInt!
|
The amount of bytes stored in .git directories |
indexedLinesCount - BigInt!
|
The number of lines indexed |
total - Int!
|
The number of all repositories in the instance, without soft-deleted or blocked repositories. |
cloned - Int!
|
The number of cloned repositories in the instance. This number might be higher than 'total', if soft-deleted repositories haven't been cleaned up yet. |
cloning - Int!
|
The number of repositories in the instance that are currently being cloned. |
notCloned - Int!
|
The number of repositories in the instance that not cloned yet. |
failedFetch - Int!
|
The number of repositories where initial cloning or subsequent fetching resulted in an error. |
indexed - Int!
|
The number of indexed repositories |
corrupted - Int!
|
The number of repositories that are currently corrupt |
Field Name | Description |
---|---|
repository - Repository!
|
The indexed repository. |
status - RepositoryTextSearchIndexStatus
|
The status of the text search index, if available. |
refs - [RepositoryTextSearchIndexedRef!]!
|
Git refs in the repository that are configured for text search indexing. |
host - repositoryIndexserverHost
|
Information about the indexserver that hosts the repo's index. |
Field Name | Description |
---|---|
updatedAt - DateTime!
|
The date that the index was last updated. |
contentByteSize - BigInt!
|
The byte size of the original content. |
contentFilesCount - Int!
|
The number of files in the original content. |
indexByteSize - Int!
|
The byte size of the index. |
indexShardsCount - Int!
|
The number of index shards. |
newLinesCount - Int!
|
EXPERIMENTAL: The number of newlines appearing in the index. |
defaultBranchNewLinesCount - Int!
|
EXPERIMENTAL: The number of newlines in the default branch. |
otherBranchesNewLinesCount - Int!
|
EXPERIMENTAL: The number of newlines in the other branches. |
A Git ref (usually a branch) in a repository that is configured to be indexed for text search.
Field Name | Description |
---|---|
ref - GitRef!
|
The Git ref (usually a branch) that is configured to be indexed for text search. To find the specific commit SHA that was indexed, use RepositoryTextSearchIndexedRef.indexedCommit; this field's ref target resolves to the current target, not the target at the time of indexing. |
indexed - Boolean!
|
Whether a text search index exists for this ref. |
current - Boolean!
|
Whether the text search index is of the current commit for the Git ref. If false, the index is stale. |
indexedCommit - GitObject
|
The indexed Git commit (which may differ from the ref's current target if the index is out of date). If indexed is false, this field's value is null. |
skippedIndexed - SkippedIndexed
|
EXPERIMENTAL: Information about the files that were not indexed. |
Field Name | Description |
---|---|
id - ID!
|
The unique ID of this saved query. |
description - String!
|
The description. |
query - String!
|
The query. |
notify - Boolean!
|
Whether or not to notify the owner of the saved search via email. This owner is either a single user, or every member of an organization that owns the saved search. |
notifySlack - Boolean!
|
Whether or not to notify on Slack. |
namespace - Namespace!
|
The user or org that owns this saved search. |
slackWebhookURL - String
|
The Slack webhook URL associated with this saved search, if any. |
Field Name | Description |
---|---|
nodes - [SavedSearch!]!
|
A list of saved searches. |
totalCount - Int!
|
The total number of saved searches in the connection. |
pageInfo - ConnectionPageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
results - SearchResults!
|
The results. |
stats - SearchResultsStats!
|
A subset of results (excluding actual search results) which are heavily cached and thus quicker to query. Useful for e.g. querying sparkline data. |
Field Name | Description |
---|---|
title - String!
|
The title. |
description - String
|
The description. |
kind - String
|
An identifier indicating the kind of alert |
proposedQueries - [SearchQueryDescription!]
|
"Did you mean: ____" query proposals |
Field Name | Description |
---|---|
description - String
|
The description. |
query - String!
|
The query. |
annotations - [SearchQueryAnnotation!]
|
Additional optional information describing attributes of this query. |
Represents phases in query parsing. The parse tree corresponds closely to the input query syntax. A subsequent processing phase on the parse tree generates a job tree. The job tree is an internal representation analogous to a database query plan. The job tree discards information about query syntax and corresponds closely to backend services (text search, git commit search, etc.).
Union Types |
---|
Field Name | Description |
---|---|
url - String!
|
URL for the individual result match. |
body - Markdown!
|
A markdown string containing the preview contents of the result match. |
highlights - [Highlight!]!
|
A list of highlights that specify locations of matches of the query in the body. Each highlight is a line number, character offset, and length. Currently, highlights are only displayed on match bodies that are code blocks. If the result body is a code block, exclude the markdown code fence lines in the line and character count. Leave as an empty list if no highlights are available. |
Field Name | Description |
---|---|
results - [SearchResult!]!
|
The results. Inside each SearchResult there may be multiple matches, e.g. a FileMatch may contain multiple line matches. |
matchCount - Int!
|
The total number of matches returned by this search. This is different than the length of the results array in that e.g. a single results array entry may contain multiple matches. For example, the results array may contain two file matches and this field would report 6 ("3 line matches per file") while the length of the results array would report 3 ("3 FileMatch results"). Typically, 'approximateResultCount', not this field, is shown to users. |
resultCount - Int!
|
DEPRECATED: Renamed to 'matchCount' for less ambiguity. renamed to matchCount for less ambiguity |
approximateResultCount - String!
|
The approximate number of results. This is like the length of the results array, except it can indicate the number of results regardless of whether or not the limit was hit. Currently, this is represented as e.g. "5+" results. This string is typically shown to users to indicate the true result count. |
limitHit - Boolean!
|
Whether or not the results limit was hit. In paginated requests, this field is always false. Use 'pageInfo.hasNextPage' instead. |
sparkline - [Int!]!
|
Integers representing the sparkline for the search results. |
repositories - [Repository!]!
|
Repositories from results. |
repositoriesCount - Int!
|
The number of repositories that had results (for clients that just wish to know how many without querying the, sometimes extremely large, list). |
cloning - [Repository!]!
|
Repositories that are busy cloning onto gitserver. In paginated search requests, some repositories may be cloning. These are reported here and you may choose to retry the paginated request with the same cursor after they have cloned OR you may simply continue making further paginated requests and choose to skip the cloning repositories. |
missing - [Repository!]!
|
Repositories or commits that do not exist. In paginated search requests, some repositories may be missing (e.g. if Sourcegraph is aware of them but is temporarily unable to serve them). These are reported here and you may choose to retry the paginated request with the same cursor and they may no longer be missing OR you may simply continue making further paginated requests and choose to skip the missing repositories. |
timedout - [Repository!]!
|
Repositories or commits which we did not manage to search in time. Trying again usually will work. In paginated search requests, this field is not relevant. |
indexUnavailable - Boolean!
|
DEPRECATED: This field is not used in known clients, and will always return false . True if indexed search is enabled but was not available during this search. |
alert - SearchAlert
|
An alert message that should be displayed before any results. |
elapsedMilliseconds - Int!
|
The time it took to generate these results. |
dynamicFilters - [SearchFilter!]!
|
Dynamic filters generated by the search results |
{
"results": [FileMatch],
"matchCount": 123,
"resultCount": 123,
"approximateResultCount": "abc123",
"limitHit": true,
"sparkline": [987],
"repositories": [Repository],
"repositoriesCount": 987,
"cloning": [Repository],
"missing": [Repository],
"timedout": [Repository],
"indexUnavailable": true,
"alert": SearchAlert,
"elapsedMilliseconds": 987,
"dynamicFilters": [SearchFilter]
}
Field Name | Description |
---|---|
approximateResultCount - String!
|
The approximate number of results returned. |
sparkline - [Int!]!
|
The sparkline. |
languages - [LanguageStatistics!]!
|
Statistics about the languages represented in the search results. Known issue: The LanguageStatistics.totalBytes field values are incorrect in the result. |
Field Name | Description |
---|---|
canSignOut - Boolean!
|
Whether the user can sign out of this session on Sourcegraph. |
Field Name | Description |
---|---|
id - Int!
|
The ID. |
subject - SettingsSubject!
|
The subject that these settings are for. |
author - User
|
The author, or null if there is no author or the authoring user was deleted. |
createdAt - DateTime!
|
The time when this was created. |
contents - JSONCString!
|
The stringified JSON contents of the settings. The contents may include "//"-style comments and trailing commas in the JSON. |
configuration - Configuration!
|
DEPRECATED: This field will be removed in a future release. The configuration. use the contents field instead |
Field Name | Description |
---|---|
subjects - [SettingsSubject!]!
|
The other settings subjects that are applied with lower precedence than this subject to form the final merged settings. For example, a user in 2 organizations would have the following settings subjects: site (global settings), org 1, org 2, and the user. |
final - String!
|
The effective final merged settings as (stringified) JSON, merged from all of the subjects. |
merged - Configuration!
|
DEPRECATED: This field will be removed in a future release. The effective final merged settings, merged from all of the subjects. use final instead |
An edit to a JSON property in a settings JSON object. The JSON property to edit can be nested.
Input Field | Description |
---|---|
keyPath - [KeyPathSegment!]!
|
The key path of the property to update. Inserting into an existing array is not yet supported. |
value - JSONValue
|
The new JSON-encoded value to insert. If the field's value is not set, the property is removed. (This is different from the field's value being the JSON null value.) When the value is a non-primitive type, it must be specified using a GraphQL variable, not an inline literal, or else the GraphQL parser will return an error. |
valueIsJSONCEncodedString - Boolean
|
Whether to treat the value as a JSONC-encoded string, which makes it possible to perform an edit that preserves (or adds/removes) comments. Default = false |
Mutations that update settings (global, organization, or user settings). These mutations are grouped together because they:
- are all versioned to avoid race conditions with concurrent editors
- all apply to a specific settings subject (i.e., a user, an organization, or the whole site)
Grouping them lets us extract those common parameters to the Mutation.settingsMutation field.
Field Name | Description |
---|---|
editSettings - UpdateSettingsPayload
|
Edit a single property in the settings object. |
|
|
editConfiguration - UpdateSettingsPayload
|
DEPRECATED Use editSettings instead. This field is a deprecated alias for it and will be removed in a future release. |
|
|
overwriteSettings - UpdateSettingsPayload
|
Overwrite the existing settings with the new settings. |
|
Input for Mutation.settingsMutation, which contains fields that all settings (global, organization, and user settings) mutations need.
SettingsSubject is something that can have settings: a site ("global settings", which is different from "site configuration"), an organization, or a user.
Field Name | Description |
---|---|
id - ID!
|
The ID. |
latestSettings - Settings
|
The latest settings. |
settingsURL - String
|
The URL to the settings. |
viewerCanAdminister - Boolean!
|
Whether the viewer can modify the subject's settings. |
settingsCascade - SettingsCascade!
|
All settings for this subject, and the individual levels in the settings cascade (global > organization > user) that were merged to produce the final merged settings. |
configurationCascade - ConfigurationCascade!
|
DEPRECATED Use settingsCascade instead. This field is a deprecated alias for it and will be removed in a future release. |
SettingsSubject Types |
---|
A site is an installation of Sourcegraph that consists of one or more servers that share the same configuration and database. The site is a singleton; the API only ever returns the single global site.
Field Name | Description |
---|---|
id - ID!
|
The site's opaque GraphQL ID. This is NOT the "site ID" as it is referred to elsewhere; use the siteID field for that. (GraphQL node types conventionally have an id field of type ID! that globally identifies the node.) |
siteID - String!
|
The site ID. |
configuration - SiteConfiguration!
|
The site's configuration. Only visible to site admins. |
latestSettings - Settings
|
The site's latest site-wide settings (which are the second-lowest-precedence in the configuration cascade for a user). |
settingsCascade - SettingsCascade!
|
The global settings for this site, and the final merged settings. All viewers can access this field. |
configurationCascade - ConfigurationCascade!
|
DEPRECATED Use settingsCascade instead. This field is a deprecated alias for it and will be removed in a future release. |
settingsURL - String
|
The URL to the site's settings. |
canReloadSite - Boolean!
|
Whether the viewer can reload the site (with the reloadSite mutation). |
viewerCanAdminister - Boolean!
|
Whether the viewer can modify the subject's settings. |
accessTokens - AccessTokenConnection!
|
A list of all access tokens on this site. |
|
|
authProviders - AuthProviderConnection!
|
A list of all authentication providers. This information is visible to all viewers and does not contain any secret information. |
externalAccounts - ExternalAccountConnection!
|
A list of all user external accounts on this site. |
|
|
buildVersion - String!
|
The build version of the Sourcegraph software that is running on this site (of the form NNNNN_YYYY-MM-DD_XXXXX, like 12345_2018-01-01_abcdef). |
productVersion - String!
|
The product version of the Sourcegraph software that is running on this site. |
updateCheck - UpdateCheck!
|
Information about software updates for the version of Sourcegraph that this site is running. |
needsRepositoryConfiguration - Boolean!
|
Whether the site needs to be configured to add repositories. |
externalServicesFromFile - Boolean!
|
Whether the external services haven been created from a configuration file specified in the EXTSVC_CONFIG_FILE. |
allowEditExternalServicesWithFile - Boolean!
|
Whether the external services can be updated even if externalServicesFromFile is true. All changes made while externalServicesFromFile is true will be discarded once Sourcegraph restarts. |
freeUsersExceeded - Boolean!
|
Whether the site is over the limit for free user accounts, and a warning needs to be shown to all users. Only applies if the site does not have a valid license. |
alerts - [Alert!]!
|
Alerts to display to the viewer. |
hasCodeIntelligence - Boolean!
|
BACKCOMPAT: Always returns true. |
sendsEmailVerificationEmails - Boolean!
|
Whether the server sends emails to users to verify email addresses. If false, then site admins must manually verify users' email addresses. |
productSubscription - ProductSubscriptionStatus!
|
Information about this site's product subscription status. |
usageStatistics - SiteUsageStatistics!
|
Usage statistics for this site. |
analytics - Analytics!
|
New usage statistics/analytics for this site. |
users - SiteUsers!
|
List all users. |
|
|
monitoringStatistics - MonitoringStatistics!
|
Monitoring overview for this site. Note: This is primarily used for displaying recently-fired alerts in the web app. If your intent is to monitor Sourcegraph, it is better to configure alerting or query Prometheus directly in order to ensure that if the frontend goes down you still receive alerts: Configure alerting: https://docs.sourcegraph.com/admin/observability/alerting Query Prometheus directly: https://docs.sourcegraph.com/admin/observability/alerting_custom_consumption |
allowSiteSettingsEdits - Boolean!
|
Whether changes can be made to site settings through the API. When global settings are configured through the GLOBAL_SETTINGS_FILE environment variable, site settings edits cannot be made through the API. |
enableLegacyExtensions - Boolean!
|
Whether to enable the extension registry and the use of extensions. Reflects the site configuration enableLegacyExtensions experimental feature value. |
upgradeReadiness - UpgradeReadiness!
|
FOR INTERNAL USE ONLY: Returns information about instance upgrade readiness. |
{
"id": 4,
"siteID": "abc123",
"configuration": SiteConfiguration,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"settingsURL": "abc123",
"canReloadSite": true,
"viewerCanAdminister": false,
"accessTokens": AccessTokenConnection,
"authProviders": AuthProviderConnection,
"externalAccounts": ExternalAccountConnection,
"buildVersion": "xyz789",
"productVersion": "xyz789",
"updateCheck": UpdateCheck,
"needsRepositoryConfiguration": true,
"externalServicesFromFile": true,
"allowEditExternalServicesWithFile": true,
"freeUsersExceeded": true,
"alerts": [Alert],
"hasCodeIntelligence": true,
"sendsEmailVerificationEmails": true,
"productSubscription": ProductSubscriptionStatus,
"usageStatistics": SiteUsageStatistics,
"analytics": Analytics,
"users": SiteUsers,
"monitoringStatistics": MonitoringStatistics,
"allowSiteSettingsEdits": true,
"enableLegacyExtensions": false,
"upgradeReadiness": UpgradeReadiness
}
Field Name | Description |
---|---|
id - Int!
|
The unique identifier of this site configuration version. |
effectiveContents - JSONCString!
|
The effective configuration JSON. |
validationMessages - [String!]!
|
Messages describing validation problems or usage of deprecated configuration in the configuration JSON. This includes both JSON Schema validation problems and other messages that perform more advanced checks on the configuration (that can't be expressed in the JSON Schema). |
history - SiteConfigurationChangeConnection
|
EXPERIMENTAL: A list of diffs to depict what changed since the previous version of this configuration. Only site admins may perform this query. |
|
Field Name | Description |
---|---|
id - ID!
|
The ID of the site config in the history. |
author - User
|
The user who made this change. If empty, it indicates that either the author's information is not available or the change in the site config was applied via an internal process (example: site startup or SITE_CONFIG_FILE being reloaded). |
reproducedDiff - Boolean!
|
A flag to indicate if the diff of changes to the previous site configuration was reproduced or not. Sometimes it may not be possible to generate a diff (for example the redacted contents are not available) in which case the value of the flag will be false. |
diff - String
|
The diff string when diffed against the previous site config. When this is null there was no diff to the previous change. |
createdAt - DateTime!
|
The timestamp when this change in the site config was applied. |
updatedAt - DateTime!
|
The timestamp when this change in the site config was modified. Usually this should be the same as createdAt as entries in the site config history are considered immutable. |
Field Name | Description |
---|---|
nodes - [SiteConfigurationChange!]!
|
A list of diffs in the site config |
totalCount - Int!
|
The total number of diffs in the connection. |
pageInfo - ConnectionPageInfo!
|
Pagination information. |
SiteUsagePeriod describes a site's usage statistics for a given timespan. This information is visible to all viewers.
Field Name | Description |
---|---|
startTime - String!
|
The time when this started. |
userCount - Int!
|
The user count. |
registeredUserCount - Int!
|
The registered user count. |
anonymousUserCount - Int!
|
The anonymous user count. |
integrationUserCount - Int!
|
The count of registered users that have been active on a code host integration. Excludes anonymous users. |
SiteUsageStatistics describes a site's aggregate usage statistics. This information is visible to all viewers.
Field Name | Description |
---|---|
daus - [SiteUsagePeriod!]!
|
Recent daily active users. |
waus - [SiteUsagePeriod!]!
|
Recent weekly active users. |
maus - [SiteUsagePeriod!]!
|
Recent monthly active users. |
Field Name | Description |
---|---|
id - ID!
|
The unique ID for the user. |
username - String!
|
User's username. |
email - String
|
User's primary email. |
displayName - String
|
User's display name |
createdAt - String!
|
The datetime when user was created in the system. |
lastActiveAt - String
|
The datetime when user was last active. |
deletedAt - String
|
The datetime when user was deleted. |
siteAdmin - Boolean!
|
Whether user is site admin or not. |
eventsCount - Float!
|
Total number of user's event_logs. |
locked - Boolean!
|
Whether or not the user account is locked. |
Enum Value | Description |
---|---|
|
|
|
User's primary email. |
|
The total number of user's event_logs. |
|
The last event_log datetime. |
|
The datetime when user was added to the system. |
|
The datetime when user was soft deleted. |
|
Whether the user is site admin or not. |
Field Name | Description |
---|---|
totalCount - Float!
|
User total count. |
nodes - [SiteUser!]!
|
List of users. |
|
Field Name | Description |
---|---|
index - String!
|
The index of this request. |
start - DateTime!
|
The date at which this request was started. |
duration - Float!
|
The duration of the request. |
user - User
|
The user associated with that request, if any. |
name - String!
|
The name of the GraphQL request. |
source - String!
|
The source from which the request originated. |
repository - Repository
|
The repository referenced by the request, if any. |
variables - String!
|
The variables used to build the GraphQL request. |
errors - [String!]!
|
The errors returned if the request failed. |
query - String!
|
The GraphQL query. |
filepath - String
|
The file path referenced by the request, if any. |
Field Name | Description |
---|---|
nodes - [SlowRequest!]!
|
A list of slow graphql requests logs. |
totalCount - Int!
|
The total number of slow graphql logs in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Union Types |
---|
Field Name | Description |
---|---|
id - ID!
|
The unique ID of the survey response |
user - User
|
The user who submitted the survey (if they were authenticated at the time). |
email - String
|
The email that the user manually entered (if they were NOT authenticated at the time). |
score - Int!
|
User's likelihood of recommending Sourcegraph to a friend, from 0-10. |
reason - String
|
The answer to "What is the most important reason for the score you gave". |
better - String
|
The answer to "What can Sourcegraph do to provide a better product" |
otherUseCase - String
|
The answer to "What do you use Sourcegraph for?". |
createdAt - DateTime!
|
The time when this response was created. |
Field Name | Description |
---|---|
nodes - [SurveyResponse!]!
|
A list of survey responses. |
totalCount - Int!
|
The total count of survey responses in the connection. This total count may be larger than the number of nodes in this object when the result is paginated. |
last30DaysCount - Int!
|
The count of survey responses submitted since 30 calendar days ago at 00:00 UTC. |
averageScore - Float!
|
The average score of survey responses in the connection submitted since 30 calendar days ago at 00:00 UTC. |
netPromoterScore - Int!
|
The net promoter score (NPS) of survey responses in the connection submitted since 30 calendar days ago at 00:00 UTC. Return value is a signed integer, scaled from -100 (all detractors) to +100 (all promoters). See https://en.wikipedia.org/wiki/Net_Promoter for explanation. |
Input Field | Description |
---|---|
email - String
|
User-provided email address, if there is no currently authenticated user. If there is, this value will not be used. |
score - Int!
|
User's likelihood of recommending Sourcegraph to a friend, from 0-10. |
otherUseCase - String
|
The answer to "What do you use Sourcegraph for?". |
better - String
|
The answer to "What would make Sourcegraph better?" |
A code symbol (e.g., a function, variable, type, class, etc.). It is derived from DocumentSymbol as defined in the Language Server Protocol (see https://microsoft.github.io/language-server-protocol/specifications/specification-3-14/#textDocument_documentSymbol).
Field Name | Description |
---|---|
name - String!
|
The name of the symbol. |
containerName - String
|
The name of the symbol that contains this symbol, if any. This field's value is not guaranteed to be structured in such a way that callers can infer a hierarchy of symbols. |
kind - SymbolKind!
|
The kind of the symbol. |
language - String!
|
The programming language of the symbol. |
location - Location!
|
The location where this symbol is defined. |
url - String!
|
The URL to this symbol (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this symbol (using an immutable revision specifier). |
fileLocal - Boolean!
|
Whether or not the symbol is local to the file it's defined in. |
Field Name | Description |
---|---|
nodes - [Symbol!]!
|
A list of symbols. |
pageInfo - PageInfo!
|
Pagination information. |
All possible kinds of symbols. This set matches that of the Language Server Protocol (https://microsoft.github.io/language-server-protocol/specification#workspace_symbol).
Field Name | Description |
---|---|
message - String!
|
The message of this status message |
A team is a grouping of users/persons into a common handle. Teams are commonly used to define codeowners.
Field Name | Description |
---|---|
id - ID!
|
The unique ID of the team. |
name - String!
|
The name of the team. Needs to be globally unique across usernames, organization names, and team names. Team names can use alphanumeric characters, - dash and / forward slash. |
url - String!
|
URL to link to the teams profile page. |
displayName - String
|
A human readable name substitute for the name. Null, if not defined. |
readonly - Boolean!
|
A team can be made read-only from the CLI instructing the UI to show a warning banner that this is managed externally, and management features will only be available to site-admins. It can also still be manipulated from the CLI. |
members - TeamMemberConnection!
|
The teams direct members. That is members that are strictly part of this team, but not members of child teams. Team membership is NOT inherited. |
parentTeam - Team
|
Parent team can be null, if this is a root team. |
childTeams - TeamConnection!
|
The list of direct child teams. |
viewerCanAdminister - Boolean!
|
True, if the current user can modify this team. |
A team member is an entity that can be associated to a team.
For now, this will be User, and will be expanded to User | Person later.
Field Name | Description |
---|---|
teams - TeamConnection!
|
All the teams this TeamMember is a direct member of. |
TeamMember Types |
---|
Field Name | Description |
---|---|
totalCount - Int!
|
The total count of items in the connection. |
pageInfo - PageInfo!
|
The pagination info for the connection. |
nodes - [TeamMember!]!
|
The current page of team members in this connection. |
Field Name | Description |
---|---|
contents - String!
|
A JSON string representing the temporary settings. |
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the repository root) of this tree entry. |
name - String!
|
The base name (i.e., file name only) of this tree entry. |
isDirectory - Boolean!
|
Whether this tree entry is a directory. |
url - String!
|
The URL to this tree entry (using the input revision specifier, which may not be immutable). |
canonicalURL - String!
|
The canonical URL to this tree entry (using an immutable revision specifier). |
externalURLs - [ExternalLink!]!
|
The URLs to this tree entry on external services. |
symbols - SymbolConnection!
|
Symbols defined in this file or directory. |
submodule - Submodule
|
Submodule metadata if this tree points to a submodule |
isSingleChild - Boolean!
|
Whether this tree entry is a single child |
Field Name | Description |
---|---|
pending - Boolean!
|
Whether an update check is currently in progress. |
checkedAt - DateTime
|
When the last update check was completed, or null if no update check has been completed (or performed) yet. |
errorMessage - String
|
If an error occurred during the last update check, this message describes the error. |
updateVersionAvailable - String
|
If an update is available, the version string of the updated version. |
Field Name | Description |
---|---|
index - Int!
|
The index of the repo in the update queue. Updating repos are placed at the end of the queue until they finish updating so don't display this if updating is true. |
updating - Boolean!
|
True if the repo is currently updating. |
total - Int!
|
The total number of repos in the update queue (including updating repos). |
Field Name | Description |
---|---|
intervalSeconds - Int!
|
The interval that was used when scheduling the current due time. |
due - DateTime!
|
The next time that the repo will be inserted into the update queue. |
index - Int!
|
The index of the repo in the schedule. |
total - Int!
|
The total number of repos in the schedule. |
Field Name | Description |
---|---|
empty - EmptyResponse
|
An empty response. |
Instance upgrade readiness information includes schema drifts and deprecated-but-unfinished out-of-band migrations.
Field Name | Description |
---|---|
schemaDrift - String!
|
The schema drift details. |
requiredOutOfBandMigrations - [OutOfBandMigration!]!
|
The list of deprecated-but-unfinished out-of-band migrations. |
Field Name | Description |
---|---|
executorSecrets - ExecutorSecretConnection!
|
The list of all available executor secrets for execution in this users namespace. |
|
|
id - ID!
|
The unique ID for the user. |
username - String!
|
The user's username. |
email - String!
|
The user's primary email address. Only the user and site admins can access this field. use emails instead |
displayName - String
|
The display name chosen by the user. |
avatarURL - String
|
The URL of the user's avatar image. |
url - String!
|
The URL to the user's profile on Sourcegraph. |
settingsURL - String
|
The URL to the user's settings. |
createdAt - DateTime!
|
The date when the user account was created on Sourcegraph. |
updatedAt - DateTime
|
The date when the user account was last updated on Sourcegraph. |
siteAdmin - Boolean!
|
Whether the user is a site admin. Only the user and site admins can access this field. |
builtinAuth - Boolean!
|
Whether the user account uses built in auth. |
latestSettings - Settings
|
The latest settings for the user. Only the user and site admins can access this field. |
settingsCascade - SettingsCascade!
|
All settings for this user, and the individual levels in the settings cascade (global > organization > user) that were merged to produce the final merged settings. Only the user and site admins can access this field. |
configurationCascade - ConfigurationCascade!
|
DEPRECATED Use settingsCascade instead. This field is a deprecated alias for it and will be removed in a future release. |
organizations - OrgConnection!
|
The organizations that this user is a member of. |
organizationMemberships - OrganizationMembershipConnection!
|
This user's organization memberships. |
tags - [String!]!
|
Tags associated with the user. These are used for internal site management and feature selection. Only the user and site admins can access this field. |
tosAccepted - Boolean!
|
Whether the user has already accepted the terms of service or not. |
searchable - Boolean!
|
Whether the user accepted to be searched in the users picker or not. |
usageStatistics - UserUsageStatistics!
|
The user's usage statistics on Sourcegraph. |
eventLogs - EventLogsConnection!
|
The user's events on Sourcegraph. |
emails - [UserEmail!]!
|
The user's email addresses. Only the user and site admins can access this field. |
accessTokens - AccessTokenConnection!
|
The user's access tokens (which grant to the holder the privileges of the user). This consists of all access tokens whose subject is this user. Only the user and site admins can access this field. |
|
|
externalAccounts - ExternalAccountConnection!
|
A list of external accounts that are associated with the user. |
|
|
session - Session!
|
The user's currently active session. Only the currently authenticated user can access this field. Site admins are not able to access sessions for other users. |
viewerCanAdminister - Boolean!
|
Whether the viewer has admin privileges on this user. The user has admin privileges on their own user, and site admins have admin privileges on all users. |
viewerCanChangeUsername - Boolean!
|
Whether the viewer can change the username of this user. The user can change their username unless auth.disableUsernameChanges is set. Site admins can always change the username of any user. |
surveyResponses - [SurveyResponse!]!
|
The user's survey responses. Only the user and site admins can access this field. |
databaseID - Int!
|
The unique numeric ID for the user. FOR INTERNAL USE ONLY. |
namespaceName - String!
|
The name of this user namespace's component. For users, this is the username. |
invitableCollaborators - [Person!]!
|
EXPERIMENTAL: Collaborators who can be invited to Sourcegraph. This typically comes from a few repositories this user has access to, and is derived from recent commit history of those. |
teams - TeamConnection!
|
All the teams this user is a direct member of. |
{
"executorSecrets": ExecutorSecretConnection,
"id": "4",
"username": "abc123",
"email": "xyz789",
"displayName": "xyz789",
"avatarURL": "abc123",
"url": "xyz789",
"settingsURL": "abc123",
"createdAt": "2007-12-03T10:15:30Z",
"updatedAt": "2007-12-03T10:15:30Z",
"siteAdmin": true,
"builtinAuth": false,
"latestSettings": Settings,
"settingsCascade": SettingsCascade,
"configurationCascade": ConfigurationCascade,
"organizations": OrgConnection,
"organizationMemberships": OrganizationMembershipConnection,
"tags": ["xyz789"],
"tosAccepted": true,
"searchable": false,
"usageStatistics": UserUsageStatistics,
"eventLogs": EventLogsConnection,
"emails": [UserEmail],
"accessTokens": AccessTokenConnection,
"externalAccounts": ExternalAccountConnection,
"session": Session,
"viewerCanAdminister": true,
"viewerCanChangeUsername": true,
"surveyResponses": [SurveyResponse],
"databaseID": 123,
"namespaceName": "xyz789",
"invitableCollaborators": [Person],
"teams": TeamConnection
}
Field Name | Description |
---|---|
email - String!
|
The email address. |
isPrimary - Boolean!
|
Whether the email address is the user's primary email address. Currently this is defined as the earliest email address associated with the user, preferring verified emails to unverified emails. |
verified - Boolean!
|
Whether the email address has been verified by the user. |
verificationPending - Boolean!
|
Whether the email address is pending verification. |
user - User!
|
The user associated with this email address. |
viewerCanManuallyVerify - Boolean!
|
Whether the viewer has privileges to manually mark this email address as verified (without the user going through the normal verification process). Only site admins have this privilege. |
UserUsageStatistics describes a user's usage statistics. This information is visible to all viewers.
Field Name | Description |
---|---|
searchQueries - Int!
|
The number of search queries that the user has performed. |
pageViews - Int!
|
The number of page views that the user has performed. |
codeIntelligenceActions - Int!
|
The number of code intelligence actions that the user has performed. |
findReferencesActions - Int!
|
The number of find-refs actions that the user has performed. |
lastActiveTime - String
|
The last time the user was active (any action, any platform). |
lastActiveCodeHostIntegrationTime - String
|
The last time the user was active on a code host integration. |
Field Name | Description |
---|---|
path - String!
|
The full path (relative to the root) of this file. |
name - String!
|
The base name (i.e., file name only) of this file. |
isDirectory - Boolean!
|
False because this is a file, not a directory. |
content - String!
|
The content of this file. |
byteSize - Int!
|
The file size in bytes. |
totalLines - Int!
|
Total line count for the file. Returns 0 for binary files. |
binary - Boolean!
|
Whether or not it is binary. |
richHTML - String!
|
The file rendered as rich HTML, or an empty string if it is not a supported rich file type. This HTML string is already escaped and thus is always safe to render. |
url - String!
|
Not implemented. |
canonicalURL - String!
|
Not implemented. |
externalURLs - [ExternalLink!]!
|
Not implemented. |
highlight - HighlightedFile!
|
Highlight the file. |
|
Field Name | Description |
---|---|
id - ID!
|
The unique ID of the webhook. |
uuid - String!
|
The user facing UUID of the webhook. |
url - String!
|
The URL of the webhook in the instance. This is the location where we expect to receive payloads. |
name - String!
|
Descriptive webhook name. |
codeHostKind - ExternalServiceKind!
|
The kind of code host sending payloads. (eg. GitHub, GitLab) |
codeHostURN - String!
|
The URN of the code host instance. (eg. https://gitlab.com) |
secret - String
|
Optional secret. |
updatedAt - DateTime!
|
The last time this webhook was updated. |
updatedBy - User
|
The user who last updated this webhook. Null if the user was deleted or if the webhook hasn't been updated yet. |
createdAt - DateTime!
|
When the webhook was created. |
createdBy - User
|
The user who created this webhook. Null if the user was deleted. |
webhookLogs - WebhookLogConnection!
|
The logs related to this webhook. |
|
{
"id": "4",
"uuid": "abc123",
"url": "abc123",
"name": "abc123",
"codeHostKind": "AWSCODECOMMIT",
"codeHostURN": "abc123",
"secret": "xyz789",
"updatedAt": "2007-12-03T10:15:30Z",
"updatedBy": User,
"createdAt": "2007-12-03T10:15:30Z",
"createdBy": User,
"webhookLogs": WebhookLogConnection
}
Field Name | Description |
---|---|
nodes - [Webhook!]!
|
A list of webhooks. |
totalCount - Int!
|
The total number of webhooks in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
id - ID!
|
The webhook log ID. |
receivedAt - DateTime!
|
The time the webhook was received at. |
externalService - ExternalService
|
The external service the webhook was matched to, if any. |
statusCode - Int!
|
The HTTP status code returned from the webhook handler. |
request - WebhookLogRequest!
|
The received webhook request. |
response - WebhookLogResponse!
|
The response sent by the webhook handler. |
Field Name | Description |
---|---|
nodes - [WebhookLog!]!
|
A list of webhook logs. |
totalCount - Int!
|
The total number of webhook logs in the connection. |
pageInfo - PageInfo!
|
Pagination information. |
Field Name | Description |
---|---|
headers - [HTTPHeader!]!
|
The headers in the HTTP message. |
body - String!
|
The body content of the HTTP message. |
WebhookLogMessage Types |
---|
Field Name | Description |
---|---|
headers - [HTTPHeader!]!
|
The headers in the HTTP message. |
body - String!
|
The body content of the HTTP message. |
method - String!
|
The method used in the HTTP request. |
url - String!
|
The requested URL. |
version - String!
|
The HTTP version in use. |
Field Name | Description |
---|---|
headers - [HTTPHeader!]!
|
The headers in the HTTP message. |
body - String!
|
The body content of the HTTP message. |
Field Name | Description |
---|---|
name - String!
|
The hostname of the indexserver. |