GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
3.7 KiB

  1. schema {
  2. query: Query
  3. mutation: Mutation
  4. subscription: Subscription
  5. }
  6. type Query {
  7. # Find character by either an ID or a nick.
  8. character(id: String, nick: String): Character!
  9. # Find characters
  10. characters(filter: CharactersFilter): [Character!]!
  11. # Find channel by name
  12. channel(name: String!): Channel!
  13. # Find channels
  14. channels(filter: ChannelsFilter): [Channel!]!
  15. # Find post by ID.
  16. post(id: String!): Post!
  17. # Find posts
  18. posts(filter: PostsFilter): [Post!]!
  19. "List unknown nicks"
  20. unknownNicks(filter: UnknownNicksFilter): [UnknownNick!]!
  21. # Find log by ID
  22. log(id: String!): Log!
  23. # Find logs
  24. logs(filter: LogsFilter): [Log!]!
  25. # Find story chapter by ID
  26. chapter(id: String!): Chapter!
  27. # Find comment by ID
  28. comment(id: String!): Comment!
  29. # Find all distinct tags used in stories
  30. tags(filter: TagFilter): [Tag!]!
  31. # Find story by ID
  32. story(id: String!): Story!
  33. # Find stories
  34. stories(filter: StoriesFilter): [Story!]!
  35. # Find file by ID
  36. file(id: String!): File!
  37. # Find files
  38. files(filter: FilesFilter): [File!]!
  39. # Find changes
  40. changes(filter: ChangesFilter): [Change!]!
  41. # Get information about the token, useful for debugging.
  42. token: Token!
  43. }
  44. type Mutation {
  45. # Add a story
  46. addStory(input: StoryAddInput!): Story!
  47. # Add a story tag
  48. addStoryTag(input: StoryTagAddInput!): Story!
  49. # Remove a story tag
  50. removeStoryTag(input: StoryTagRemoveInput!): Story!
  51. # Edit a story
  52. editStory(input: StoryEditInput!): Story!
  53. # Remove a story
  54. removeStory(input: StoryRemoveInput!): Story!
  55. # Add a chapter to a story
  56. addChapter(input: ChapterAddInput!): Chapter!
  57. # Edit a chapter
  58. editChapter(input: ChapterEditInput!): Chapter!
  59. # Move a chapter
  60. moveChapter(input: ChapterMoveInput!): Chapter!
  61. # Remove a chapter
  62. removeChapter(input: ChapterRemoveInput!): Chapter!
  63. "Add a comment to a chapter."
  64. addComment(input: CommentAddInput!): Comment!
  65. "Edit a comment in a chapter."
  66. editComment(input: CommentEditInput!): Comment!
  67. "Remove a comment in a chapter."
  68. removeComment(input: CommentRemoveInput!): Comment!
  69. # Add a new log
  70. addLog(input: LogAddInput!): Log!
  71. # Import a log
  72. importLog(input: LogImportInput!): [Log!]!
  73. # Split a log
  74. splitLog(input: LogSplitInput!): Log!
  75. # Merge a log
  76. mergeLog(input: LogMergeInput!): Log!
  77. # Edit a log
  78. editLog(input: LogEditInput!): Log!
  79. # Remove a log
  80. removeLog(input: LogRemoveInput!): Log!
  81. # Add a post
  82. addPost(input: PostAddInput!): Post!
  83. # Edit a post
  84. editPost(input: PostEditInput!): Post!
  85. # Move a post. All affected posts will be returned.
  86. movePost(input: PostMoveInput!): [Post!]!
  87. # Remove a post
  88. removePost(input: PostRemoveInput!): Post!
  89. # Add a new character
  90. addCharacter(input: CharacterAddInput!): Character!
  91. # Add nick to character
  92. addCharacterNick(input: CharacterNickInput!): Character!
  93. # Remove nick from character
  94. removeCharacterNick(input: CharacterNickInput!): Character!
  95. # Edit character
  96. editCharacter(input: CharacterEditInput!): Character!
  97. # Remove a character
  98. removeCharacter(input: CharacterRemoveInput!): Character!
  99. # Add a channel
  100. addChannel(input: ChannelAddInput!): Channel!
  101. # Edit a channel
  102. editChannel(input: ChannelEditInput!): Channel!
  103. "Upload a file"
  104. uploadFile(input: FileUploadInput): File!
  105. "Edit a file"
  106. editFile(input: FileEditInput): File!
  107. "Remove a file"
  108. removeFile(input: FileRemoveInput): File!
  109. }
  110. type Subscription {
  111. """
  112. Changes subscribes to the changes matching the following keys.
  113. """
  114. changes(filter: ChangesFilter): Change!
  115. }
  116. # A Time represents a RFC3339 encoded date with up to millisecond precision.
  117. scalar Time
  118. """A GraphQL file upload."""
  119. scalar Upload