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.

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