This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathschema.graphql
executable file
·7403 lines (6950 loc) · 182 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# See docs/api.md for guidance on schema evolution.
#
schema {
query: Query
mutation: Mutation
}
"""
This type is not returned by any resolver, but serves to document what an error
response will look like.
"""
type Error {
"""
A string giving more context about the error that ocurred.
"""
message: String!
"""
The GraphQL path to where the error happened. For an error in the query
query {
user {
externalID # This is a nullable field that failed computing.
}
}
the path would be ["user", "externalID"].
"""
path: [String!]!
"""
Optional additional context on the error.
"""
extensions: ErrorExtensions
}
"""
Optional additional context on an error returned from a resolver.
It may also contain more properties, which aren't strictly typed here.
"""
type ErrorExtensions {
"""
An error code, which can be asserted on.
Possible error codes are communicated in the doc string of the field.
"""
code: String
}
"""
Represents a null return value.
"""
type EmptyResponse {
"""
A dummy null value.
"""
alwaysNil: String
}
"""
An object with an ID.
"""
interface Node {
"""
The ID of the node.
"""
id: ID!
}
"""
A valid JSON value.
"""
scalar JSONValue
"""
A string that contains valid JSON, with additional support for //-style comments and trailing commas.
"""
scalar JSONCString
"""
A mutation.
"""
type Mutation {
"""
Updates the user profile information for the user with the given ID.
Only the user and site admins may perform this mutation.
"""
updateUser(user: ID!, username: String, displayName: String, avatarURL: String): User!
"""
Creates an organization. The caller is added as a member of the newly created organization.
Only authenticated users may perform this mutation.
"""
createOrganization(name: String!, displayName: String, statsID: ID): Org!
"""
Updates an organization.
Only site admins and any member of the organization may perform this mutation.
"""
updateOrganization(id: ID!, displayName: String): Org!
"""
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
"""
deleteOrganization(organization: ID!, hard: Boolean): EmptyResponse
"""
Adds a external service. Only site admins may perform this mutation.
"""
addExternalService(input: AddExternalServiceInput!): ExternalService!
"""
Updates a external service. Only site admins may perform this mutation.
"""
updateExternalService(input: UpdateExternalServiceInput!): ExternalService!
"""
Delete an external service. Only site admins may perform this mutation.
"""
deleteExternalService(externalService: ID!, async: Boolean = false): EmptyResponse!
"""
Tests the connection to a mirror repository's original source repository. This is an
expensive and slow operation, so it should only be used for interactive diagnostics.
Only site admins may perform this mutation.
"""
checkMirrorRepositoryConnection(
"""
The ID of the existing repository whose mirror to check.
"""
repository: ID
"""
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).
"""
name: String
): CheckMirrorRepositoryConnectionResult!
"""
Schedule the mirror repository to be updated from its original source repository. Updating
occurs automatically, so this should not normally be needed.
Only site admins may perform this mutation.
"""
updateMirrorRepository(
"""
The mirror repository to update.
"""
repository: ID!
): EmptyResponse!
"""
Creates a new user account.
Only site admins may perform this mutation.
"""
createUser(
"""
The new user's username.
"""
username: String!
"""
The new user's optional email address. If given, it is marked as verified.
"""
email: String
): CreateUserResult!
"""
Randomize a user's password so that they need to reset it before they can sign in again.
Only site admins may perform this mutation.
"""
randomizeUserPassword(user: ID!): RandomizeUserPasswordResult!
"""
Adds an email address to the user's account. The email address will be marked as unverified until the user
has followed the email verification process.
Only the user and site admins may perform this mutation.
"""
addUserEmail(user: ID!, email: String!): EmptyResponse!
"""
Removes an email address from the user's account.
Only the user and site admins may perform this mutation.
"""
removeUserEmail(user: ID!, email: String!): EmptyResponse!
"""
Set an email address as the user's primary.
Only the user and site admins may perform this mutation.
"""
setUserEmailPrimary(user: ID!, email: String!): EmptyResponse!
"""
Manually set the verification status of a user's email, without going through the normal verification process
(of clicking on a link in the email with a verification code).
Only site admins may perform this mutation.
"""
setUserEmailVerified(user: ID!, email: String!, verified: Boolean!): EmptyResponse!
"""
Resend a verification email, no op if the email is already verified.
Only the user and site admins may perform this mutation.
"""
resendVerificationEmail(user: ID!, email: String!): 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.
"""
deleteUser(user: ID!, hard: Boolean): EmptyResponse
"""
Bulk "deleteUser" action.
"""
deleteUsers(users: [ID!]!, hard: Boolean): EmptyResponse
"""
Updates the current user's password. The oldPassword arg must match the user's current password.
"""
updatePassword(oldPassword: String!, newPassword: String!): EmptyResponse
"""
Creates a password for the current user. It is only permitted if the user does not have a password and
they don't have any login connections.
"""
createPassword(newPassword: String!): EmptyResponse
"""
Sets the user to accept the site's Terms of Service and Privacy Policy.
If the ID is ommitted, the current user is assumed.
Only the user or site admins may perform this mutation.
"""
setTosAccepted(userID: ID): EmptyResponse!
"""
Current user opt in/out from being searchable in the users picker.
"""
setSearchable(searchable: Boolean!): EmptyResponse!
"""
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.
"""
createAccessToken(user: ID!, scopes: [String!]!, note: String!): CreateAccessTokenResult!
"""
Deletes and immediately revokes the specified access token, specified by either its ID or by the token
itself.
Only site admins or the user who owns the token may perform this mutation.
"""
deleteAccessToken(byID: ID, byToken: String): EmptyResponse!
"""
Deletes the association between an external account and its Sourcegraph user. It does NOT delete the external
account on the external service where it resides.
Only site admins or the user who is associated with the external account may perform this mutation.
"""
deleteExternalAccount(externalAccount: ID!): EmptyResponse!
"""
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.
"""
inviteEmailToSourcegraph(email: String!): EmptyResponse!
"""
Invite the user with the given username to join the organization. The invited user account must already
exist.
Only site admins and any organization member may perform this mutation.
"""
inviteUserToOrganization(organization: ID!, username: String, email: String): InviteUserToOrganizationResult!
"""
Accept or reject an existing organization invitation.
Only the recipient of the invitation may perform this mutation.
"""
respondToOrganizationInvitation(
"""
The organization invitation.
"""
organizationInvitation: ID!
"""
The response to the invitation.
"""
responseType: OrganizationInvitationResponseType!
): EmptyResponse!
"""
Resend the notification about an organization invitation to the recipient.
Only site admins and any member of the organization may perform this mutation.
"""
resendOrganizationInvitationNotification(
"""
The organization invitation.
"""
organizationInvitation: ID!
): EmptyResponse!
"""
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.
"""
revokeOrganizationInvitation(
"""
The organization invitation.
"""
organizationInvitation: ID!
): EmptyResponse!
"""
Immediately add a user as a member to the organization, without sending an invitation email.
Only site admins may perform this mutation. Organization members may use the inviteUserToOrganization
mutation to invite users.
"""
addUserToOrganization(organization: ID!, username: String!): EmptyResponse!
"""
Removes a user as a member from an organization.
Only site admins and any member of the organization may perform this mutation.
"""
removeUserFromOrganization(user: ID!, organization: ID!): EmptyResponse
"""
Adds or removes a tag on a user.
Tags are used internally by Sourcegraph as feature flags for experimental features.
Only site admins may perform this mutation.
"""
setTag(
"""
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.)
"""
node: ID!
"""
The tag to set.
"""
tag: String!
"""
The desired state of the tag on the user (whether to add or remove): true to add, false to
remove.
"""
present: Boolean!
): EmptyResponse!
"""
Adds a Phabricator repository to Sourcegraph.
"""
addPhabricatorRepo(
"""
The callsign, for example "MUX".
"""
callsign: String!
"""
The name, for example "github.com/gorilla/mux".
"""
name: String
"""
An alias for name. DEPRECATED: use name instead.
"""
uri: String
"""
The URL to the phabricator instance (e.g. http://phabricator.sgdev.org).
"""
url: String!
): EmptyResponse
"""
Resolves a revision for a given diff from Phabricator.
"""
resolvePhabricatorDiff(
"""
The name of the repository that the diff is based on.
"""
repoName: String!
"""
The ID of the diff on Phabricator.
"""
diffID: ID!
"""
The base revision this diff is based on.
"""
baseRev: String!
"""
The raw contents of the diff from Phabricator.
Required if Sourcegraph doesn't have a Conduit API token.
"""
patch: String
"""
The description of the diff. This will be used as the commit message.
"""
description: String
"""
The name of author of the diff.
"""
authorName: String
"""
The author's email.
"""
authorEmail: String
"""
When the diff was created.
"""
date: String
): GitCommit
"""
Logs a user event.
"""
logUserEvent(event: UserEvent!, userCookieID: String!): EmptyResponse @deprecated(reason: "use logEvent instead")
"""
Logs an event.
"""
logEvent(
"""
The name of the event.
"""
event: String!
"""
The randomly generated unique user ID stored in a browser cookie.
"""
userCookieID: String!
"""
The first sourcegraph URL visited by the user, stored in a browser cookie.
"""
firstSourceURL: String
"""
The last sourcegraph URL visited by the user, stored in a browser cookie.
"""
lastSourceURL: String
"""
The URL when the event was logged.
"""
url: String!
"""
The source of the event.
"""
source: EventSource!
"""
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
"""
cohortID: String
"""
An optional referrer parameter for the user's current session.
Only captured and stored on Sourcegraph Cloud.
"""
referrer: String
"""
The additional argument information.
"""
argument: 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.
"""
publicArgument: String
"""
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only.
"""
deviceID: String
"""
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.
"""
eventID: Int
"""
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.
"""
insertID: String
): EmptyResponse
"""
Logs a batch of events.
"""
logEvents(events: [Event!]): 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.
"""
settingsMutation(input: SettingsMutationGroupInput!): SettingsMutation
"""
DEPRECATED: Use settingsMutation instead. This field is a deprecated alias for settingsMutation and will be
removed in a future release.
"""
configurationMutation(input: SettingsMutationGroupInput!): SettingsMutation
@deprecated(reason: "use settingsMutation instead")
"""
Updates the site configuration. Returns whether or not a restart is required for the update to be applied.
Only site admins may perform this mutation.
"""
updateSiteConfiguration(
"""
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.
"""
lastID: Int!
"""
A JSON object containing the entire site configuration. The previous site configuration will be replaced
with this new value.
"""
input: String!
): Boolean!
"""
Sets whether the user with the specified user ID is a site admin.
Only site admins may perform this mutation.
"""
# SECURITY: Only trusted users should be given site admin permissions.
# Site admins have full access to the site configuration and other
# sensitive data, and they can perform destructive actions such as
# restarting the site.
setUserIsSiteAdmin(userID: ID!, siteAdmin: Boolean!): EmptyResponse
"""
Invalidates all sessions belonging to a user.
Only site admins may perform this mutation.
"""
invalidateSessionsByID(userID: ID!): EmptyResponse
"""
Bulk "invalidateSessionsByID" action.
"""
invalidateSessionsByIDs(userIDs: [ID!]!): EmptyResponse
"""
Reloads the site by restarting the server. This is not supported for all deployment
types. This may cause downtime.
Only site admins may perform this mutation.
"""
reloadSite: EmptyResponse
"""
Submits a user satisfaction (NPS) survey.
"""
submitSurvey(input: SurveySubmissionInput!): EmptyResponse
"""
Submits happiness feedback.
"""
submitHappinessFeedback(input: HappinessFeedbackSubmissionInput!): EmptyResponse
"""
Submits a request for a Sourcegraph Enterprise trial license.
"""
requestTrial(email: String!): EmptyResponse
"""
Manages the extension registry.
"""
extensionRegistry: ExtensionRegistryMutation!
"""
Creates a saved search.
"""
createSavedSearch(
description: String!
query: String!
notifyOwner: Boolean!
notifySlack: Boolean!
orgID: ID
userID: ID
): SavedSearch!
"""
Updates a saved search
"""
updateSavedSearch(
id: ID!
description: String!
query: String!
notifyOwner: Boolean!
notifySlack: Boolean!
orgID: ID
userID: ID
): SavedSearch!
"""
Deletes a saved search
"""
deleteSavedSearch(id: ID!): EmptyResponse
"""
OBSERVABILITY
Set the status of a test alert of the specified parameters - useful for validating
'observability.alerts' configuration. Alerts may take up to a minute to fire.
"""
triggerObservabilityTestAlert(
"""
Level of alert to test - either warning or critical.
"""
level: String!
): EmptyResponse!
"""
Set the repos synced by an external service
"""
setExternalServiceRepos(id: ID!, repos: [String!], allRepos: Boolean!): EmptyResponse!
"""
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.
"""
SetMigrationDirection(id: ID!, applyReverse: Boolean!): EmptyResponse!
"""
SetUserPublicRepos sets the list of public repos for a user's search context, ensuring those repos
exist and are cloned
"""
SetUserPublicRepos(userID: ID!, repoURIs: [String!]!): EmptyResponse!
"""
(experimental) Create a new feature flag
"""
createFeatureFlag(
"""
The name of the feature flag
"""
name: String!
"""
The value of the feature flag. Only set if the new feature flag
will be a concrete boolean flag. Mutually exclusive with rolloutBasisPoints.
"""
value: Boolean
"""
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.
"""
rolloutBasisPoints: Int
): FeatureFlag!
"""
(experimental) Delete a feature flag
"""
deleteFeatureFlag(
"""
The name of the feature flag
"""
name: String!
): EmptyResponse!
"""
(experimental) Update a feature flag
"""
updateFeatureFlag(
"""
The name of the feature flag
"""
name: String!
"""
The value of the feature flag. Only set if the new feature flag
will be a concrete boolean flag. Mutually exclusive with rollout.
"""
value: Boolean
"""
The ratio of users the feature flag will apply to, expressed in basis points (0.01%).
Mutually exclusive with value.
"""
rolloutBasisPoints: Int
): FeatureFlag!
"""
(experimental) Create a new feature flag override for the given org or user
"""
createFeatureFlagOverride(
"""
The namespace for this feature flag. Must be either a user ID or an org ID.
"""
namespace: ID!
"""
The name of the feature flag this override applies to
"""
flagName: String!
"""
The overridden value
"""
value: Boolean!
): FeatureFlagOverride!
"""
Delete a feature flag override
"""
deleteFeatureFlagOverride(
"""
The ID of the feature flag override to delete
"""
id: ID!
): EmptyResponse!
"""
Update a feature flag override
"""
updateFeatureFlagOverride(
"""
The ID of the feature flag override to update
"""
id: ID!
"""
The updated value of the feature flag override
"""
value: Boolean!
): FeatureFlagOverride!
"""
Overwrites and saves the temporary settings for the current user.
If temporary settings for the user do not exist, they are created.
"""
overwriteTemporarySettings(
"""
The new temporary settings for the current user, as a JSON string.
"""
contents: String!
): EmptyResponse!
"""
Merges the given settings edit with the current temporary settings for the current user.
Keys in the given edit take priority over key in the temporary settings. The merge is
not recursive.
If temporary settings for the user do not exist, they are created.
"""
editTemporarySettings(
"""
The settings to merge with the current temporary settings for the current user, as a JSON string.
"""
settingsToEdit: String!
): EmptyResponse!
"""
Sends an email for testing Sourcegraph's email configuration.
Only administrators can use this API.
"""
sendTestEmail(to: String!): String!
"""
Enqueues a sync for the external service. It will be picked up in the background.
Site-admin or owner of the external service only.
"""
syncExternalService(id: ID!): EmptyResponse!
}
"""
A description of a user event.
"""
input Event {
"""
The name of the event.
"""
event: String!
"""
The randomly generated unique user ID stored in a browser cookie.
"""
userCookieID: String!
"""
The first sourcegraph URL visited by the user, stored in a browser cookie.
"""
firstSourceURL: String
"""
The last sourcegraph URL visited by the user, stored in a browser cookie.
"""
lastSourceURL: String
"""
The URL when the event was logged.
"""
url: String!
"""
The source of the event.
"""
source: EventSource!
"""
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
"""
cohortID: String
"""
An optional referrer parameter for the user's current session.
Only captured and stored on Sourcegraph Cloud.
"""
referrer: String
"""
The additional argument information.
"""
argument: 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.
"""
publicArgument: String
"""
Device ID used for Amplitude analytics. Used on Sourcegraph Cloud only.
"""
deviceID: String
"""
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.
"""
eventID: Int
"""
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.
"""
insertID: String
}
"""
A new external service.
"""
input AddExternalServiceInput {
"""
The kind of the external service.
"""
kind: ExternalServiceKind!
"""
The display name of the external service.
"""
displayName: String!
"""
The JSON configuration of the external service.
"""
config: String!
"""
The namespace this external service belongs to.
This can be used both for a user and an organization.
"""
namespace: ID
}
"""
Fields to update for an existing external service.
"""
input UpdateExternalServiceInput {
"""
The id of the external service to update.
"""
id: ID!
"""
The updated display name, if provided.
"""
displayName: String
"""
The updated config, if provided.
"""
config: String
}
"""
Describes options for rendering Markdown.
"""
input MarkdownOptions {
"""
A dummy null value (empty input types are not allowed yet).
"""
alwaysNil: String
}
"""
The product sources where events can come from.
"""
enum EventSource {
WEB
CODEHOSTINTEGRATION
BACKEND
STATICWEB
IDEEXTENSION
}
"""
Input for Mutation.settingsMutation, which contains fields that all settings (global, organization, and user
settings) mutations need.
"""
input SettingsMutationGroupInput {
"""
The subject whose settings to mutate (organization, user, etc.).
"""
subject: ID!
"""
The ID of the last-known settings known to the client, or null if there is none. This field is used to
prevent race conditions when there are concurrent editors.
"""
lastID: Int
}
"""
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.
"""
type SettingsMutation {
"""
Edit a single property in the settings object.
"""
editSettings(
"""
The edit to apply to the settings.
"""
edit: SettingsEdit!
): UpdateSettingsPayload
"""
DEPRECATED
"""
editConfiguration(edit: ConfigurationEdit!): UpdateSettingsPayload
@deprecated(
reason: "Use editSettings instead. This field is a deprecated alias for it and will be removed in a future release."
)
"""
Overwrite the existing settings with the new settings.
"""
overwriteSettings(
"""
A JSON object (stringified) of the settings. Trailing commas and "//"-style comments are supported. The
entire previous settings value will be overwritten by this new value.
"""
contents: String!
): UpdateSettingsPayload
}
"""
An edit to a JSON property in a settings JSON object. The JSON property to edit can be nested.
"""
input SettingsEdit {
"""
The key path of the property to update.
Inserting into an existing array is not yet supported.
"""
keyPath: [KeyPathSegment!]!
"""
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.
"""
value: JSONValue
"""
Whether to treat the value as a JSONC-encoded string, which makes it possible to perform an edit that
preserves (or adds/removes) comments.
"""
valueIsJSONCEncodedString: Boolean = false
}
"""
DEPRECATED: This type was renamed to SettingsEdit.
NOTE: GraphQL does not support @deprecated directives on INPUT_FIELD_DEFINITION (input fields).
"""
input ConfigurationEdit {
"""
DEPRECATED
"""
keyPath: [KeyPathSegment!]!
"""
DEPRECATED
"""
value: JSONValue
"""
DEPRECATED
"""
valueIsJSONCEncodedString: Boolean = false
}
"""
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"].