schema.graphql 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. trainingType(where: TrainingTypeWhereUniqueInput!): TrainingType
  23. trainingTypes(
  24. where: TrainingTypeWhereInput
  25. orderBy: TrainingTypeOrderByInput
  26. skip: Int
  27. after: String
  28. before: String
  29. first: Int
  30. last: Int
  31. ): [TrainingType!]!
  32. blocks(
  33. where: BlockWhereInput
  34. orderBy: BlockOrderByInput
  35. skip: Int
  36. after: String
  37. before: String
  38. first: Int
  39. last: Int
  40. ): [Block!]!
  41. formats(
  42. where: FormatWhereInput
  43. orderBy: FormatOrderByInput
  44. skip: Int
  45. after: String
  46. before: String
  47. first: Int
  48. last: Int
  49. ): [Format!]!
  50. currentUser: User!
  51. }
  52. type Mutation {
  53. createUser(data: UserCreateInput!): User!
  54. updateUser(email: String!, data: UserUpdateInput!): User
  55. deleteUser(email: String!): User
  56. createTraining(
  57. title: String!
  58. type: TrainingTypeCreateOneInput!
  59. trainingDate: DateTime!
  60. location: String!
  61. attendance: Int!
  62. published: Boolean!
  63. blocks: BlockCreateManyInput
  64. ): Training!
  65. createTrainingType(name: String!, description: String!): TrainingType!
  66. createBlock(
  67. sequence: Int!
  68. title: String!
  69. duration: Int!
  70. variation: String
  71. format: ID
  72. tracks: [ID]!
  73. exercises: [ID]!
  74. description: String!
  75. ): Block!
  76. createFormat(name: String!, description: String!): Format!
  77. userLogin(email: String!, password: String!): User!
  78. userLogout: String!
  79. userSignup(name: String!, email: String!, password: String!): User!
  80. requestReset(email: String!): String!
  81. resetPassword(token: String!, password: String!): User!
  82. }