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.

154 lines
3.0 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. # Find log by ID
  20. log(id: String!): Log!
  21. # Find logs
  22. logs(filter: LogsFilter): [Log!]!
  23. # Find story chapter by ID
  24. chapter(id: String!): Chapter!
  25. # Find all distinct tags used in stories
  26. tags: [Tag!]!
  27. # Find story by ID
  28. story(id: String!): Story!
  29. # Find stories
  30. stories(filter: StoriesFilter): [Story!]!
  31. # Find file by ID
  32. file(id: String!): File!
  33. # Find files
  34. files(filter: FilesFilter): [File!]!
  35. # Find changes
  36. changes(filter: ChangesFilter): [Change!]!
  37. # Get information about the token, useful for debugging.
  38. token: Token!
  39. }
  40. type Mutation {
  41. # Add a story
  42. addStory(input: StoryAddInput!): Story!
  43. # Add a story tag
  44. addStoryTag(input: StoryTagAddInput!): Story!
  45. # Remove a story tag
  46. removeStoryTag(input: StoryTagRemoveInput!): Story!
  47. # Edit a story
  48. editStory(input: StoryEditInput!): Story!
  49. # Remove a story
  50. removeStory(input: StoryRemoveInput!): Story!
  51. # Add a chapter to a story
  52. addChapter(input: ChapterAddInput!): Chapter!
  53. # Edit a chapter
  54. editChapter(input: ChapterEditInput!): Chapter!
  55. # Move a chapter
  56. moveChapter(input: ChapterMoveInput!): Chapter!
  57. # Remove a chapter
  58. removeChapter(input: ChapterRemoveInput!): Chapter!
  59. # Add a new log
  60. addLog(input: LogAddInput!): Log!
  61. # Import a log
  62. importLog(input: LogImportInput!): [Log!]!
  63. # Edit a log
  64. editLog(input: LogEditInput!): Log!
  65. # Remove a log
  66. removeLog(input: LogRemoveInput!): Log!
  67. # Add a post
  68. addPost(input: PostAddInput!): Post!
  69. # Edit a post
  70. editPost(input: PostEditInput!): Post!
  71. # Move a post. All affected posts will be returned.
  72. movePost(input: PostMoveInput!): [Post!]!
  73. # Remove a post
  74. removePost(input: PostRemoveInput!): Post!
  75. # Add a new character
  76. addCharacter(input: CharacterAddInput!): Character!
  77. # Add nick to character
  78. addCharacterNick(input: CharacterNickInput!): Character!
  79. # Remove nick from character
  80. removeCharacterNick(input: CharacterNickInput!): Character!
  81. # Edit character
  82. editCharacter(input: CharacterEditInput!): Character!
  83. # Remove a character
  84. removeCharacter(input: CharacterRemoveInput!): Character!
  85. # Add a channel
  86. addChannel(input: ChannelAddInput!): Channel!
  87. # Edit a channel
  88. editChannel(input: ChannelEditInput!): Channel!
  89. }
  90. type Subscription {
  91. """
  92. Changes subscribes to the changes matching the following keys.
  93. """
  94. changes(keys: [ChangeKeyInput!]!): Change!
  95. }
  96. # A Date represents a RFC3339 encoded date with up to millisecond precision.
  97. scalar Date