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.

169 lines
3.3 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: [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. # Add a new log
  68. addLog(input: LogAddInput!): Log!
  69. # Import a log
  70. importLog(input: LogImportInput!): [Log!]!
  71. # Edit a log
  72. editLog(input: LogEditInput!): Log!
  73. # Remove a log
  74. removeLog(input: LogRemoveInput!): Log!
  75. # Add a post
  76. addPost(input: PostAddInput!): Post!
  77. # Edit a post
  78. editPost(input: PostEditInput!): Post!
  79. # Move a post. All affected posts will be returned.
  80. movePost(input: PostMoveInput!): [Post!]!
  81. # Remove a post
  82. removePost(input: PostRemoveInput!): Post!
  83. # Add a new character
  84. addCharacter(input: CharacterAddInput!): Character!
  85. # Add nick to character
  86. addCharacterNick(input: CharacterNickInput!): Character!
  87. # Remove nick from character
  88. removeCharacterNick(input: CharacterNickInput!): Character!
  89. # Edit character
  90. editCharacter(input: CharacterEditInput!): Character!
  91. # Remove a character
  92. removeCharacter(input: CharacterRemoveInput!): Character!
  93. # Add a channel
  94. addChannel(input: ChannelAddInput!): Channel!
  95. # Edit a channel
  96. editChannel(input: ChannelEditInput!): Channel!
  97. }
  98. type Subscription {
  99. """
  100. Changes subscribes to the changes matching the following keys.
  101. """
  102. changes(keys: [ChangeKeyInput!]!): Change!
  103. }
  104. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  105. scalar Date