schema.graphql 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # import * from './database/generated/prisma.graphql'
  2. type Query {
  3. users(
  4. where: UserWhereInput
  5. orderBy: UserOrderByInput
  6. skip: Int
  7. after: String
  8. before: String
  9. first: Int
  10. last: Int
  11. ): [User]!
  12. training(where: TrainingWhereUniqueInput!): Training
  13. trainings(
  14. where: TrainingWhereInput
  15. orderBy: TrainingOrderByInput
  16. skip: Int
  17. after: String
  18. before: String
  19. first: Int
  20. last: Int
  21. ): [Training]!
  22. trainingTypes(
  23. where: TrainingTypeWhereInput
  24. orderBy: TrainingTypeOrderByInput
  25. skip: Int
  26. after: String
  27. before: String
  28. first: Int
  29. last: Int
  30. ): [TrainingType]!
  31. blocks(
  32. where: BlockWhereInput
  33. orderBy: BlockOrderByInput
  34. skip: Int
  35. after: String
  36. before: String
  37. first: Int
  38. last: Int
  39. ): [Block]!
  40. currentUser: User!
  41. }
  42. type Mutation {
  43. createUser(data: UserCreateInput!): User!
  44. updateUser(email: String!, data: UserUpdateInput!): User
  45. deleteUser(email: String!): User
  46. createTraining(title: String!): Training!
  47. createTrainingType(name: String!, description: String!): TrainingType!
  48. createBlock(
  49. sequence: Int!
  50. title: String!
  51. duration: Int!
  52. variation: String
  53. format: ID
  54. tracks: [ID]!
  55. exercises: [ID]!
  56. description: String!
  57. ): Block!
  58. login(email: String!, password: String!): User!
  59. logout: String!
  60. signup(name: String!, email: String!, password: String!): User!
  61. requestReset(email: String!): String!
  62. resetPassword(token: String!, password: String!): User!
  63. }