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.

151 lines
3.2 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 by either a list of ids, nicks or an author. Only one parameter at a time
  6. characters(ids: [String!], nicks: [String!], author: String): [Character!]!
  7. # Find channel by name
  8. channel(name: String!): Channel
  9. # Find all channels. Specifying `logged: true` restricts the search to only logged.
  10. channels(logged: Boolean): [Channel!]!
  11. # Find log by ID
  12. log(id: String): Log
  13. # Find logs by a list of IDs
  14. logs(input: LogQueryInput): [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.
  19. posts(ids: [String!]!): [Post!]!
  20. # Find file by ID
  21. file(id: String!): File
  22. # Files get all available files. If includePublic is set, it will return public files as well
  23. files(includePublic: Boolean, mimeTypes: [String!]): [File!]!
  24. # Find story by ID
  25. story(id: String!): Story
  26. # Find stories
  27. stories(input: StoriesQueryInput!): [Story!]!
  28. # Find story chapter by ID
  29. chapter(id: String!): Chapter
  30. # Find all distinct tags used in stories
  31. tags: [Tag!]!
  32. # Find current session
  33. session: Session!
  34. }
  35. # The Mutation type represents write entry points into the API.
  36. type Mutation {
  37. # Add a new character
  38. addCharacter(input: CharacterAddInput!): Character!
  39. # Add nick to character
  40. addCharacterNick(input: CharacterNickInput!): Character!
  41. # Remove nick from character
  42. removeCharacterNick(input: CharacterNickInput!): Character!
  43. # Edit character
  44. editCharacter(input: CharacterEditInput!): Character!
  45. # Remove a character
  46. removeCharacter(id: String!): Character!
  47. # Add a channel
  48. addChannel(input: ChannelAddInput!): Channel!
  49. # Edit a channel
  50. editChannel(input: ChannelEditInput!): Channel!
  51. # Remove a channel
  52. removeChannel(name: String!): Channel!
  53. # Add a new log
  54. addLog(input: LogAddInput!): Log!
  55. # Edit a log
  56. editLog(input: LogEditInput!): Log!
  57. # Remove a log
  58. removeLog(id: String!): Log!
  59. # Add a post
  60. addPost(input: AddPostInput!): Post!
  61. # Edit a post
  62. editPost(input: EditPostInput!): Post!
  63. # Move a post
  64. movePost(input: MovePostInput!): Post!
  65. # Remove a post
  66. removePost(id: String!): Post!
  67. # Edit a file
  68. editFile(input: EditFileInput!): File!
  69. # Remove a file
  70. removeFile(id: String!): File!
  71. # Add a story
  72. addStory(input: StoryAddInput!): Story!
  73. # Add a story tag
  74. addStoryTag(input: StoryTagAddInput!): Story!
  75. # Remove a story tag
  76. removeStoryTag(input: StoryTagRemoveInput!): Story!
  77. # Edit a story
  78. editStory(input: StoryEditInput!): Story!
  79. # Remove a story
  80. removeStory(id: String!): Story!
  81. # Add a chapter to a story
  82. addChapter(input: ChapterAddInput!): Chapter!
  83. # Edit a chapter
  84. editChapter(input: ChapterEditInput!): Chapter!
  85. # Remove a chapter
  86. removeChapter(id: String!): Chapter!
  87. # Log in
  88. login(username: String!, password: String!): Session!
  89. # Log out
  90. logout(): Session!
  91. }
  92. schema {
  93. query: Query
  94. mutation: Mutation
  95. }