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.

105 lines
2.2 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: Date!
  13. # The in-universe date and time of the chapter
  14. fictionalDate: Date
  15. # The date of edit.
  16. editedDate: Date!
  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: Date
  54. }
  55. # Input for editChapter mutation
  56. input ChapterEditInput {
  57. # The chapter to edit
  58. id: String!
  59. # Change the chapter's title
  60. title: String
  61. # Change the source
  62. source: String
  63. # Set the fictional date for a chapter
  64. fictionalDate: Date
  65. # Remove the fictional date for a chapter
  66. clearFictionalDate: Boolean
  67. }
  68. # Input for moveChapter mutation
  69. input ChapterMoveInput {
  70. # The chapter to move
  71. id: String!
  72. # The story to move it to
  73. storyId: String!
  74. }
  75. # Input for removeChapter mutation
  76. input ChapterRemoveInput {
  77. # The chapter to remove
  78. id: String!
  79. }