-
Notifications
You must be signed in to change notification settings - Fork 14
/
schema.graphql
3796 lines (2962 loc) · 73 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
directive @constraint(minLength: Int, maxLength: Int, startsWith: String, endsWith: String, contains: String, notContains: String, pattern: String, format: String, min: Float, max: Float, exclusiveMin: Float, exclusiveMax: Float, multipleOf: Float, minItems: Int, maxItems: Int, uniqueTypeName: String) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION | ARGUMENT_DEFINITION
directive @auth(mode: String!, group: String) on FIELD_DEFINITION
"""Rate limit within a given period of time, in seconds"""
directive @rateLimit(period: Int!, limit: Int!) on FIELD_DEFINITION
directive @privateCache(strict: Boolean! = false) on FIELD_DEFINITION
directive @objectCache(maxAge: Int = 1000) on FIELD_DEFINITION
directive @logCache(type: String!, identifier: String = "id") on FIELD_DEFINITION
directive @purgeCache(type: String!, identifier: String = "id") on FIELD_DEFINITION
directive @cacheControl(maxAge: Int, scope: CacheControlScope, inheritMaxAge: Boolean) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION
directive @complexity(value: Int!, multipliers: [String!]) on FIELD_DEFINITION
type Query {
article(input: ArticleInput!): Article
campaign(input: CampaignInput!): Campaign
campaigns(input: CampaignsInput!): CampaignConnection!
circle(input: CircleInput!): Circle
node(input: NodeInput!): Node
nodes(input: NodesInput!): [Node!]
frequentSearch(input: FrequentSearchInput!): [String!]
search(input: SearchInput!): SearchResultConnection!
official: Official!
oss: OSS!
viewer: User
user(input: UserInput!): User
oauthRequestToken: String
exchangeRates(input: ExchangeRatesInput): [ExchangeRate!]
oauthClient(input: OAuthClientInput!): OAuthClient
moment(input: MomentInput!): Moment
}
type Mutation {
"""Publish an article onto IPFS."""
publishArticle(input: PublishArticleInput!): Draft!
"""Edit an article."""
editArticle(input: EditArticleInput!): Article!
"""Bookmark or unbookmark article"""
toggleSubscribeArticle(input: ToggleItemInput!): Article! @deprecated(reason: "Use toggleBookmarkArticle instead")
toggleBookmarkArticle(input: ToggleItemInput!): Article!
"""Appreciate an article."""
appreciateArticle(input: AppreciateArticleInput!): Article!
"""Read an article."""
readArticle(input: ReadArticleInput!): Article!
"""Bookmark or unbookmark tag."""
toggleFollowTag(input: ToggleItemInput!): Tag! @deprecated(reason: "Use toggleBookmarkTag instead")
toggleBookmarkTag(input: ToggleItemInput!): Tag!
toggleArticleRecommend(input: ToggleRecommendInput!): Article!
updateArticleState(input: UpdateArticleStateInput!): Article!
updateArticleSensitive(input: UpdateArticleSensitiveInput!): Article!
deleteTags(input: DeleteTagsInput!): Boolean
renameTag(input: RenameTagInput!): Tag!
mergeTags(input: MergeTagsInput!): Tag!
putWritingChallenge(input: PutWritingChallengeInput!): WritingChallenge!
applyCampaign(input: ApplyCampaignInput!): Campaign!
updateCampaignApplicationState(input: UpdateCampaignApplicationStateInput!): Campaign!
toggleWritingChallengeFeaturedArticles(input: ToggleWritingChallengeFeaturedArticlesInput!): Campaign!
sendCampaignAnnouncement(input: SendCampaignAnnouncementInput!): Boolean
"""Create or update a Circle."""
putCircle(input: PutCircleInput!): Circle!
"""Follow or unfollow a Circle."""
toggleFollowCircle(input: ToggleItemInput!): Circle! @deprecated(reason: "No longer in use")
"""Subscribe a Circle."""
subscribeCircle(input: SubscribeCircleInput!): SubscribeCircleResult!
"""Unsubscribe a Circle."""
unsubscribeCircle(input: UnsubscribeCircleInput!): Circle!
"""Add or remove Circle's articles"""
putCircleArticles(input: PutCircleArticlesInput!): Circle! @deprecated(reason: "No longer in use")
"""Invite others to join circle"""
invite(input: InviteCircleInput!): [Invitation!]
"""Publish or update a comment."""
putComment(input: PutCommentInput!): Comment!
"""Remove a comment."""
deleteComment(input: DeleteCommentInput!): Comment!
"""Pin or Unpin a comment."""
togglePinComment(input: ToggleItemInput!): Comment!
"""Upvote or downvote a comment."""
voteComment(input: VoteCommentInput!): Comment!
"""Unvote a comment."""
unvoteComment(input: UnvoteCommentInput!): Comment!
"""Update a comments' state."""
updateCommentsState(input: UpdateCommentsStateInput!): [Comment!]!
"""Pin a comment."""
pinComment(input: PinCommentInput!): Comment!
"""Unpin a comment."""
unpinComment(input: UnpinCommentInput!): Comment!
"""Create or update a draft."""
putDraft(input: PutDraftInput!): Draft!
"""Remove a draft."""
deleteDraft(input: DeleteDraftInput!): Boolean
"""Mark all received notices as read."""
markAllNoticesAsRead: Boolean
"""Upload a single file."""
singleFileUpload(input: SingleFileUploadInput!): Asset!
directImageUpload(input: DirectImageUploadInput!): Asset!
"""Add specific user behavior record."""
logRecord(input: LogRecordInput!): Boolean
"""Add blocked search keyword to blocked_search_word db"""
addBlockedSearchKeyword(input: KeywordInput!): BlockedSearchKeyword!
"""Delete blocked search keywords from search_history db"""
deleteBlockedSearchKeywords(input: KeywordsInput!): Boolean
"""Submit inappropriate content report"""
submitReport(input: SubmitReportInput!): Report!
setBoost(input: SetBoostInput!): Node!
putRemark(input: PutRemarkInput!): String
putSkippedListItem(input: PutSkippedListItemInput!): [SkippedListItem!]
setFeature(input: SetFeatureInput!): Feature!
toggleSeedingUsers(input: ToggleSeedingUsersInput!): [User]!
putAnnouncement(input: PutAnnouncementInput!): Announcement!
deleteAnnouncements(input: DeleteAnnouncementsInput!): Boolean!
putRestrictedUsers(input: PutRestrictedUsersInput!): [User!]!
putIcymiTopic(input: PutIcymiTopicInput!): IcymiTopic
setSpamStatus(input: SetSpamStatusInput!): Article!
"""Send verification code for email."""
sendVerificationCode(input: SendVerificationCodeInput!): Boolean
"""Confirm verification code from email."""
confirmVerificationCode(input: ConfirmVerificationCodeInput!): ID!
"""Reset user or payment password."""
resetPassword(input: ResetPasswordInput!): Boolean
"""Set user email."""
setEmail(input: SetEmailInput!): User!
"""Verify user email."""
verifyEmail(input: VerifyEmailInput!): AuthResult!
"""Set user currency preference."""
setCurrency(input: SetCurrencyInput!): User!
"""Login user."""
emailLogin(input: EmailLoginInput!): AuthResult!
"""Get signing message."""
generateSigningMessage(input: GenerateSigningMessageInput!): SigningMessageResult!
"""Login/Signup via a wallet."""
walletLogin(input: WalletLoginInput!): AuthResult!
"""Add a wallet login to current user."""
addWalletLogin(input: WalletLoginInput!): User!
"""Remove a wallet login from current user."""
removeWalletLogin: User!
"""Login/Signup via social accounts."""
socialLogin(input: SocialLoginInput!): AuthResult!
"""Add a social login to current user."""
addSocialLogin(input: SocialLoginInput!): User!
"""Remove a social login from current user."""
removeSocialLogin(input: RemoveSocialLoginInput!): User!
"""Logout user."""
userLogout: Boolean!
"""Reset Liker ID"""
resetLikerId(input: ResetLikerIdInput!): User!
"""Update user information."""
updateUserInfo(input: UpdateUserInfoInput!): User!
"""Set user name."""
setUserName(input: SetUserNameInput!): User!
"""Set user email login password."""
setPassword(input: SetPasswordInput!): User!
"""Update user notification settings."""
updateNotificationSetting(input: UpdateNotificationSettingInput!): User!
"""Follow or Unfollow current user."""
toggleFollowUser(input: ToggleItemInput!): User!
"""Block or Unblock a given user."""
toggleBlockUser(input: ToggleItemInput!): User!
"""Clear read history for user."""
clearReadHistory(input: ClearReadHistoryInput!): User!
"""Clear search history for user."""
clearSearchHistory: Boolean
"""Migrate articles from other service provider."""
migration(input: MigrationInput!): Boolean
"""Let Traveloggers owner claims a Logbook, returns transaction hash"""
claimLogbooks(input: ClaimLogbooksInput!): ClaimLogbooksResult!
"""update tags for showing on profile page"""
putFeaturedTags(input: FeaturedTagsInput!): [Tag!]
"""Update state of a user, used in OSS."""
updateUserState(input: UpdateUserStateInput!): [User!]
"""Update state of a user, used in OSS."""
updateUserRole(input: UpdateUserRoleInput!): User!
"""Update referralCode of a user, used in OSS."""
updateUserExtra(input: UpdateUserExtraInput!): User!
"""Update state of a user, used in OSS."""
refreshIPNSFeed(input: RefreshIPNSFeedInput!): User!
toggleUsersBadge(input: ToggleUsersBadgeInput!): [User]!
unbindLikerId(input: UnbindLikerIdInput!): User!
"""Add Credit to User Wallet"""
addCredit(input: AddCreditInput!): AddCreditResult!
"""Pay to another user or article"""
payTo(input: PayToInput!): PayToResult!
"""Payout to user"""
payout(input: PayoutInput!): Transaction!
"""Create Stripe Connect account for Payout"""
connectStripeAccount(input: ConnectStripeAccountInput!): ConnectStripeAccountResult!
"""Withdraw locked ERC20/native token from donation vault"""
withdrawLockedTokens: WithdrawLockedTokensResult!
"""Create or Update an OAuth Client, used in OSS."""
putOAuthClient(input: PutOAuthClientInput!): OAuthClient
putCollection(input: PutCollectionInput!): Collection!
deleteCollections(input: DeleteCollectionsInput!): Boolean!
"""Add articles to the begining of the collections."""
addCollectionsArticles(input: AddCollectionsArticlesInput!): [Collection!]!
"""Remove articles from the collection."""
deleteCollectionArticles(input: DeleteCollectionArticlesInput!): Collection!
"""Reorder articles in the collection."""
reorderCollectionArticles(input: ReorderCollectionArticlesInput!): Collection!
likeCollection(input: LikeCollectionInput!): Collection!
unlikeCollection(input: UnlikeCollectionInput!): Collection!
putMoment(input: PutMomentInput!): Moment!
deleteMoment(input: DeleteMomentInput!): Moment!
likeMoment(input: LikeMomentInput!): Moment!
unlikeMoment(input: UnlikeMomentInput!): Moment!
}
"""
This type contains metadata, content, hash and related data of an article. If you
want information about article's comments. Please check Comment type.
"""
type Article implements Node & PinnableWork {
"""Unique ID of this article"""
id: ID!
"""The number represents how popular is this article."""
topicScore: Int
"""Slugified article title."""
slug: String!
"""Time of this article was created."""
createdAt: DateTime!
"""Time of this article was revised."""
revisedAt: DateTime
"""State of this article."""
state: ArticleState!
"""Author of this article."""
author: User!
"""Article title."""
title: String!
"""Article cover's link."""
cover: String
"""
List of assets are belonged to this article (Only the author can access currently).
"""
assets: [Asset!]!
"""A short summary for this article."""
summary: String!
"""This value determines if the summary is customized or not."""
summaryCustomized: Boolean!
"""Tags attached to this article."""
tags: [Tag!]
"""Word count of this article."""
wordCount: Int
"""IPFS hash of this article."""
dataHash: String!
"""Media hash, composed of cid encoding, of this article."""
mediaHash: String!
"""Short hash for shorter url addressing"""
shortHash: String!
"""Content (HTML) of this article."""
content: String!
"""Different foramts of content."""
contents: ArticleContents!
"""Original language of content"""
language: String
"""List of articles which added this article into their collections."""
collectedBy(input: ConnectionArgs!): ArticleConnection!
"""List of articles added into this article' collection."""
collection(input: ConnectionArgs!): ArticleConnection!
"""Related articles to this article."""
relatedArticles(input: ConnectionArgs!): ArticleConnection!
relatedArticlesExcludeSpam(input: ConnectionArgs!): ArticleConnection!
"""Donation-related articles to this article."""
relatedDonationArticles(input: RelatedDonationArticlesInput!): ArticleConnection!
"""Appreciations history of this article."""
appreciationsReceived(input: ConnectionArgs!): AppreciationConnection!
"""Total number of appreciations recieved of this article."""
appreciationsReceivedTotal: Int!
"""Total number of donation recieved of this article."""
donationCount: Int!
"""Total number of readers of this article."""
readerCount: Int!
"""Limit the nuhmber of appreciate per user."""
appreciateLimit: Int!
"""Number represents how many times per user can appreciate this article."""
appreciateLeft: Int!
"""This value determines if current viewer has appreciated or not."""
hasAppreciate: Boolean!
"""This value determines if current viewer can SuperLike or not."""
canSuperLike: Boolean!
"""This value determines if current Viewer has bookmarked of not."""
subscribed: Boolean! @deprecated(reason: "Use bookmarked instead")
bookmarked: Boolean!
"""
This value determines if this article is an author selected article or not.
"""
pinned: Boolean!
"""Translation of article title and content."""
translation(input: TranslationArgs): ArticleTranslation
"""Available translation languages."""
availableTranslations: [UserLanguage!]
"""Transactions history of this article."""
transactionsReceivedBy(input: TransactionsReceivedByArgs!): UserConnection!
"""Donations of this article, grouped by sender"""
donations(input: ConnectionArgs!): ArticleDonationConnection!
"""Cumulative reading time in seconds"""
readTime: Float!
"""Revision Count"""
revisionCount: Int!
"""Access related fields on circle"""
access: ArticleAccess!
"""whether content is marked as sensitive by author"""
sensitiveByAuthor: Boolean!
"""whether content is marked as sensitive by admin"""
sensitiveByAdmin: Boolean!
"""License Type"""
license: ArticleLicenseType!
"""whether current viewer has donated to this article"""
donated: Boolean!
"""creator message asking for support"""
requestForDonation: String
"""creator message after support"""
replyToDonator: String
"""the iscnId if published to ISCN"""
iscnId: String
"""whether readers can comment"""
canComment: Boolean!
"""whether the first line of paragraph should be indented"""
indentFirstLine: Boolean!
"""history versions"""
versions(input: ArticleVersionsInput!): ArticleVersionsConnection!
"""associated campaigns"""
campaigns: [ArticleCampaign!]!
oss: ArticleOSS!
remark: String
"""The counting number of comments."""
commentCount: Int!
"""The number determines how many pinned comments can be set."""
pinCommentLimit: Int!
"""The number determines how many comments can be set as pinned comment."""
pinCommentLeft: Int!
"""List of pinned comments."""
pinnedComments: [Comment!]
"""List of featured comments of this article."""
featuredComments(input: FeaturedCommentsInput!): CommentConnection!
"""List of comments of this article."""
comments(input: CommentsInput!): CommentConnection!
"""The counting number of this article."""
responseCount: Int!
"""List of responses of a article."""
responses(input: ResponsesInput!): ResponseConnection!
}
type ArticleCampaign {
campaign: Campaign!
stage: CampaignStage
}
input ArticleVersionsInput {
after: String
first: Int
}
type ArticleVersionsConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArticleVersionEdge]!
}
type ArticleVersionEdge {
node: ArticleVersion!
cursor: String!
}
type ArticleVersion implements Node {
id: ID!
dataHash: String
mediaHash: String
title: String!
summary: String!
contents: ArticleContents!
translation(input: TranslationArgs): ArticleTranslation
createdAt: DateTime!
description: String
}
"""This type contains content, count and related data of an article tag."""
type Tag implements Node {
"""Unique id of this tag."""
id: ID!
"""Content of this tag."""
content: String!
"""List of how many articles were attached with this tag."""
articles(input: TagArticlesInput!): ArticleConnection!
articlesExcludeSpam(input: TagArticlesInput!): ArticleConnection!
"""Time of this tag was created."""
createdAt: DateTime!
"""This value determines if current viewer is following or not."""
isFollower: Boolean
"""Tags recommended based on relations to current tag."""
recommended(input: ConnectionArgs!): TagConnection!
"""Authors recommended based on relations to current tag."""
recommendedAuthors(input: ConnectionArgs!): UserConnection!
"""Counts of this tag."""
numArticles: Int!
numAuthors: Int!
oss: TagOSS!
remark: String
deleted: Boolean!
}
type ArticleContents {
"""Markdown content of this article."""
markdown: String!
"""HTML content of this article."""
html: String!
}
type ArticleAccess {
type: ArticleAccessType!
secret: String
circle: Circle
}
type ArticleOSS {
boost: Float!
score: Float!
inRecommendIcymi: Boolean!
inRecommendHottest: Boolean!
inRecommendNewest: Boolean!
inSearch: Boolean!
spamStatus: SpamStatus!
}
type SpamStatus {
"""spam confident score by machine, null for not checked yet. """
score: Float
"""
whether this article is labeled as spam by human, null for not labeled yet.
"""
isSpam: Boolean
}
type ArticleTranslation {
title: String
content: String
summary: String
language: String
}
type TagOSS {
boost: Float!
score: Float!
}
type ArticleConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArticleEdge!]
}
type ArticleEdge {
cursor: String!
node: Article!
}
type TagConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [TagEdge!]
}
type TagEdge {
cursor: String!
node: Tag!
}
type ArticleDonationConnection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArticleDonationEdge!]
}
type ArticleDonationEdge {
cursor: String!
node: ArticleDonation!
}
type ArticleDonation {
id: ID!
sender: User
}
input ArticleInput {
mediaHash: String
shortHash: String
}
input PublishArticleInput {
id: ID!
"""whether publish to ISCN"""
iscnPublish: Boolean
}
input EditArticleInput {
id: ID!
state: ArticleState
pinned: Boolean
title: String
summary: String
tags: [String!]
content: String
cover: ID
collection: [ID!]
circle: ID
accessType: ArticleAccessType
sensitive: Boolean
license: ArticleLicenseType
indentFirstLine: Boolean
requestForDonation: String
replyToDonator: String
"""revision description"""
description: String
"""whether publish to ISCN"""
iscnPublish: Boolean
"""whether readers can comment"""
canComment: Boolean
"""which campaigns to attach"""
campaigns: [ArticleCampaignInput!]
}
input ArticleCampaignInput {
campaign: ID!
stage: ID
}
input AppreciateArticleInput {
id: ID!
amount: Int!
token: String
superLike: Boolean
}
input ReadArticleInput {
id: ID!
}
input ToggleRecommendInput {
id: ID!
enabled: Boolean!
type: RecommendTypes
}
input UpdateArticleStateInput {
id: ID!
state: ArticleState!
}
input UpdateArticleSensitiveInput {
id: ID!
sensitive: Boolean!
}
input DeleteTagsInput {
ids: [ID!]!
}
input RenameTagInput {
id: ID!
content: String!
}
input MergeTagsInput {
ids: [ID!]!
content: String!
}
enum TagArticlesSortBy {
byHottestDesc
byCreatedAtDesc
}
input TagArticlesInput {
after: String
first: Int
oss: Boolean
sortBy: TagArticlesSortBy = byCreatedAtDesc
}
input TransactionsReceivedByArgs {
after: String
first: Int
purpose: TransactionPurpose!
senderId: ID
}
input TranslationArgs {
language: UserLanguage!
}
input RelatedDonationArticlesInput {
after: String
first: Int
oss: Boolean
"""index of article list, min: 0, max: 49"""
random: Int
}
"""Enums for an article state."""
enum ArticleState {
active
archived
banned
}
"""Enums for types of article access"""
enum ArticleAccessType {
public
paywall
}
"""Enums for types of article license"""
enum ArticleLicenseType {
cc_0
cc_by_nc_nd_2
cc_by_nc_nd_4
arr
}
"""Enums for types of recommend articles."""
enum RecommendTypes {
icymi
hottest
newest
search
}
input CampaignInput {
shortHash: String!
}
input CampaignsInput {
after: String
first: Int
"""return pending and archived campaigns"""
oss: Boolean = false
}
input PutWritingChallengeInput {
id: ID
name: [TranslationInput!]
cover: ID
link: String
announcements: [ID!]
applicationPeriod: DatetimeRangeInput
writingPeriod: DatetimeRangeInput
stages: [CampaignStageInput!]
state: CampaignState
}
input ApplyCampaignInput {
id: ID!
}
input UpdateCampaignApplicationStateInput {
campaign: ID!
user: ID!
state: CampaignApplicationState!
}
input ToggleWritingChallengeFeaturedArticlesInput {
campaign: ID!
articles: [ID!]!
enabled: Boolean!
}
input SendCampaignAnnouncementInput {
campaign: ID!
announcement: [TranslationInput!]!
link: String!
password: String!
}
input CampaignStageInput {
name: [TranslationInput!]!
description: [TranslationInput!]
period: DatetimeRangeInput
}
input TranslationInput {
language: UserLanguage!
text: String!
}
input DatetimeRangeInput {
start: DateTime!
end: DateTime
}
interface Campaign {
id: ID!
shortHash: String!
name: String!
state: CampaignState!
}
enum CampaignState {
pending
active
finished
archived
}
type WritingChallenge implements Node & Campaign {
id: ID!
shortHash: String!
name(input: TranslationArgs): String!
description(input: TranslationArgs): String
cover: String
link: String!
announcements: [Article!]!
applicationPeriod: DatetimeRange
writingPeriod: DatetimeRange
stages: [CampaignStage!]!
state: CampaignState!
participants(input: CampaignParticipantsInput!): CampaignParticipantConnection!
articles(input: CampaignArticlesInput!): CampaignArticleConnection!
application: CampaignApplication
oss: CampaignOSS!
}
type CampaignOSS {
boost: Float!
}
type CampaignApplication {
state: CampaignApplicationState!
createdAt: DateTime!
}
type CampaignParticipantConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [CampaignParticipantEdge!]
}
type CampaignParticipantEdge {
cursor: String!
application: CampaignApplication
node: User!
}
type CampaignArticleConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [CampaignArticleEdge!]!
}
type CampaignArticleEdge {
cursor: String!
node: Article!
featured: Boolean!
announcement: Boolean!
}
input CampaignParticipantsInput {
after: String
first: Int
"""return all state participants"""
oss: Boolean = false
}
type DatetimeRange {
start: DateTime!
end: DateTime
}
enum CampaignApplicationState {
pending
succeeded
rejected
}
type CampaignStage {
id: ID!
name(input: TranslationArgs): String!
description(input: TranslationArgs): String!
period: DatetimeRange
}
input CampaignArticlesInput {
after: String
first: Int
filter: CampaignArticlesFilter
}
input CampaignArticlesFilter {
stage: ID
featured: Boolean
}
type CampaignConnection implements Connection {
totalCount: Int!
pageInfo: PageInfo!
edges: [CampaignEdge!]
}
type CampaignEdge {
cursor: String!
node: Campaign!
}
type Circle implements Node {
"""Unique ID."""
id: ID!
"""Circle avatar's link."""
avatar: String @deprecated(reason: "No longer in use")
"""Circle cover's link."""
cover: String @deprecated(reason: "No longer in use")
"""Slugified name of this Circle."""
name: String! @deprecated(reason: "No longer in use")
"""Human readable name of this Circle."""
displayName: String! @deprecated(reason: "No longer in use")
"""A short description of this Circle."""
description: String
"""Prices offered by this Circle."""
prices: [Price!]
"""Circle owner."""
owner: User!
"""List of Circle member."""
members(input: ConnectionArgs!): MemberConnection! @deprecated(reason: "No longer in use")
"""List of Circle follower."""
followers(input: ConnectionArgs!): UserConnection! @deprecated(reason: "No longer in use")
"""List of works belong to this Circle."""
works(input: ConnectionArgs!): ArticleConnection! @deprecated(reason: "No longer in use")
"""State of this Circle."""
state: CircleState! @deprecated(reason: "No longer in use")
"""Created time."""
createdAt: DateTime! @deprecated(reason: "No longer in use")
"""Updated time."""
updatedAt: DateTime! @deprecated(reason: "No longer in use")
"""This value determines if current viewer is following Circle or not."""
isFollower: Boolean! @deprecated(reason: "No longer in use")
"""This value determines if current viewer is Member or not."""
isMember: Boolean! @deprecated(reason: "No longer in use")
"""Invitations belonged to this Circle."""
invites: Invites!