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.

140 lines
2.9 KiB

  1. # The Query type represents the read entry points into the API.
  2. type Query {
  3. # Find character by either an ID or a nick.
  4. character(id: String, nick: String): Character
  5. # Find characters
  6. characters(filter: CharactersFilter): [Character!]!
  7. # Find channel by name
  8. channel(name: String!): Channel
  9. # Find channels
  10. channels(filter: ChannelsFilter): [Channel!]!
  11. # Find log by ID
  12. log(id: String!): Log
  13. # Find logs
  14. logs(filter: LogsFilter): [LogHeader!]!
  15. # Find post by ID.
  16. post(id: String!): Post
  17. # Find posts by IDs. It's meant to allow other parts of the UI to link to a cluster of posts, e.g. for a room description for the
  18. # Mapp should it ever become a thing. This does not have a filter, since it's meant to be queried in the logs' response's selection set.
  19. posts(ids: [String!]!): [Post!]!
  20. # Find file by ID
  21. file(id: String!): File
  22. # Find files
  23. files(filter: FilesFilter): [File!]!
  24. # Find story by ID
  25. story(id: String!): Story
  26. # Find stories
  27. stories(filter: StoriesFilter): [Story!]!
  28. # Find story chapter by ID
  29. chapter(id: String!): Chapter
  30. # Find all distinct tags used in stories
  31. tags: [Tag!]!
  32. }
  33. # The Mutation type represents write entry points into the API.
  34. type Mutation {
  35. # Add a new character
  36. addCharacter(input: CharacterAddInput!): Character!
  37. # Add nick to character
  38. addCharacterNick(input: CharacterNickInput!): Character!
  39. # Remove nick from character
  40. removeCharacterNick(input: CharacterNickInput!): Character!
  41. # Edit character
  42. editCharacter(input: CharacterEditInput!): Character!
  43. # Remove a character
  44. removeCharacter(id: String!): Character!
  45. # Add a channel
  46. addChannel(input: ChannelAddInput!): Channel!
  47. # Edit a channel
  48. editChannel(input: ChannelEditInput!): Channel!
  49. # Remove a channel
  50. removeChannel(name: String!): Channel!
  51. # Add a new log
  52. addLog(input: LogAddInput!): Log!
  53. # Edit a log
  54. editLog(input: LogEditInput!): Log!
  55. # Remove a log
  56. removeLog(id: String!): Log!
  57. # Add a post
  58. addPost(input: AddPostInput!): Post!
  59. # Edit a post
  60. editPost(input: EditPostInput!): Post!
  61. # Move a post
  62. movePost(input: MovePostInput!): Post!
  63. # Remove a post
  64. removePost(id: String!): Post!
  65. # Edit a file
  66. editFile(input: EditFileInput!): File!
  67. # Remove a file
  68. removeFile(id: String!): File!
  69. # Add a story
  70. addStory(input: StoryAddInput!): Story!
  71. # Add a story tag
  72. addStoryTag(input: StoryTagAddInput!): Story!
  73. # Remove a story tag
  74. removeStoryTag(input: StoryTagRemoveInput!): Story!
  75. # Edit a story
  76. editStory(input: StoryEditInput!): Story!
  77. # Remove a story
  78. removeStory(id: String!): Story!
  79. # Add a chapter to a story
  80. addChapter(input: ChapterAddInput!): Chapter!
  81. # Edit a chapter
  82. editChapter(input: ChapterEditInput!): Chapter!
  83. # Remove a chapter
  84. removeChapter(id: String!): Chapter!
  85. }
  86. schema {
  87. query: Query
  88. mutation: Mutation
  89. }