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.

90 lines
1.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 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. # Find current session
  19. session: Session!
  20. }
  21. # The Mutation type represents write entry points into the API.
  22. type Mutation {
  23. # Add a new character
  24. addCharacter(input: CharacterAddInput!): Character!
  25. # Add nick to character
  26. addCharacterNick(input: CharacterNickInput!): Character!
  27. # Remove nick from character
  28. removeCharacterNick(input: CharacterNickInput!): Character!
  29. # Edit character
  30. editCharacter(input: CharacterEditInput!): Character!
  31. # Remove a character
  32. removeCharacter(id: String!): Character!
  33. # Add a new log
  34. addLog(input: LogAddInput!): Log!
  35. # Edit a log
  36. editLog(input: LogEditInput!): Log!
  37. # Remove a log
  38. removeLog(id: String!): Log!
  39. # Add a post
  40. addPost(input: AddPostInput!): Post!
  41. # Edit a post
  42. editPost(input: EditPostInput!): Post!
  43. # Move a post
  44. movePost(input: MovePostInput!): Post!
  45. # Remove a post
  46. removePost(id: String!): Post!
  47. # Edit a file
  48. editFile(input: EditFileInput!): File!
  49. # Remove a file
  50. removeFile(id: String!): File
  51. # Log in
  52. login(username: String!, password: String!): Session!
  53. # Log out
  54. logout(): Session!
  55. }
  56. schema {
  57. query: Query
  58. mutation: Mutation
  59. }