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.

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