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.

93 lines
2.1 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 log by ID
  8. log(id: String): Log
  9. # Find logs by a list of IDs
  10. logs(input: LogQueryInput): [LogHeader!]!
  11. # Find post by ID
  12. post(id: String!): Post
  13. # 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
  14. # Mapp should it ever become a thing.
  15. posts(ids: [String!]!): [Post!]!
  16. # Find file by ID
  17. file(id: String!): File
  18. # Files get all available files. If includePublic is set, it will return public files as well
  19. files(includePublic: Boolean, mimeTypes: [String!]): [File!]!
  20. # Find current session
  21. session: Session!
  22. }
  23. # The Mutation type represents write entry points into the API.
  24. type Mutation {
  25. # Add a new character
  26. addCharacter(input: CharacterAddInput!): Character!
  27. # Add nick to character
  28. addCharacterNick(input: CharacterNickInput!): Character!
  29. # Remove nick from character
  30. removeCharacterNick(input: CharacterNickInput!): Character!
  31. # Edit character
  32. editCharacter(input: CharacterEditInput!): Character!
  33. # Remove a character
  34. removeCharacter(id: String!): Character!
  35. # Add a new log
  36. addLog(input: LogAddInput!): Log!
  37. # Edit a log
  38. editLog(input: LogEditInput!): Log!
  39. # Remove a log
  40. removeLog(id: String!): Log!
  41. # Add a post
  42. addPost(input: AddPostInput!): Post!
  43. # Edit a post
  44. editPost(input: EditPostInput!): Post!
  45. # Move a post
  46. movePost(input: MovePostInput!): Post!
  47. # Remove a post
  48. removePost(id: String!): Post!
  49. # Edit a file
  50. editFile(input: EditFileInput!): File!
  51. # Remove a file
  52. removeFile(id: String!): File
  53. # Log in
  54. login(username: String!, password: String!): Session!
  55. # Log out
  56. logout(): Session!
  57. }
  58. schema {
  59. query: Query
  60. mutation: Mutation
  61. }