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.

114 lines
2.4 KiB

  1. # A Chapter is the main content body of a story.
  2. type Chapter {
  3. # The chapter's ID
  4. id: String!
  5. # The chapter's title
  6. title: String!
  7. # The chapter's author
  8. author: String!
  9. # The chapter's source
  10. source: String!
  11. # When the chapter was posted initialy
  12. createdDate: Time!
  13. # The in-universe date and time of the chapter
  14. fictionalDate: Time
  15. # The date of edit.
  16. editedDate: Time!
  17. "The comment mode."
  18. commentMode: ChapterCommentMode!
  19. "Whether the author has locket comments."
  20. commentsLocked: Boolean!
  21. "A shorthand for checking whether a logged-in user can comment on this chapter."
  22. canComment: Boolean!
  23. "Get all chapter comments."
  24. comments(limit: Int): [Comment!]!
  25. }
  26. """
  27. The possibles modes of comments for a chapter.
  28. """
  29. enum ChapterCommentMode {
  30. "Comments are disabled and hidden."
  31. Disabled
  32. "Comments should be shown as typical news article comments."
  33. Article
  34. "Comments should be shown in a compact form suitable for many small messages."
  35. Chat
  36. "Comments are going to be shown as omni-tool messages."
  37. Message
  38. }
  39. # Input for addChapter mutation
  40. input ChapterAddInput {
  41. # The story to add a chapter to
  42. storyId: String!
  43. # The title to give the chapter. It can not be left empty
  44. title: String!
  45. # The author to set for the chapter. It will use the logged in user ID, and only
  46. # users with appropriate permissions can post as another author. Even then, it's only
  47. # for importing/moving content. This author name will not be used when logging the
  48. # submission
  49. author: String
  50. # The markdown source for the content
  51. source: String!
  52. # Optionally, assign a fictional date for the chapter
  53. fictionalDate: Time
  54. "The comment mode for the chapter."
  55. commentMode: ChapterCommentMode
  56. }
  57. # Input for editChapter mutation
  58. input ChapterEditInput {
  59. # The chapter to edit
  60. id: String!
  61. # Change the chapter's title
  62. title: String
  63. # Change the source
  64. source: String
  65. # Set the fictional date for a chapter
  66. fictionalDate: Time
  67. # Remove the fictional date for a chapter
  68. clearFictionalDate: Boolean
  69. "Set the comment mode for the chapter"
  70. commentMode: ChapterCommentMode
  71. "Set whether the chapter comments are locked"
  72. commentsLocked: Boolean
  73. }
  74. # Input for moveChapter mutation
  75. input ChapterMoveInput {
  76. # The chapter to move
  77. id: String!
  78. # The story to move it to
  79. storyId: String!
  80. }
  81. # Input for removeChapter mutation
  82. input ChapterRemoveInput {
  83. # The chapter to remove
  84. id: String!
  85. }