schema.graphql 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # import * from './database/generated/prisma.graphql'
  2. scalar Upload
  3. input InstrumentParameterInput {
  4. id: ID
  5. tag: String!
  6. name: String
  7. description: String
  8. type: String!
  9. values: String
  10. }
  11. input InstrumentCommandInput {
  12. id: ID
  13. tag: String!
  14. name: String
  15. description: String!
  16. readString: String
  17. writeString: String
  18. subsystem: String
  19. parameters: [ID]!
  20. }
  21. input FileUpload {
  22. id: ID
  23. name: String!
  24. description: String!
  25. file: Upload!
  26. }
  27. type Query {
  28. projects(where: ProjectWhereInput, orderBy: ProjectOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Project]!
  29. projectVersions(where: ProjectVersionWhereInput, orderBy: ProjectVersionOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [ProjectVersion]!
  30. instruments(where: InstrumentWhereInput, orderBy: InstrumentOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Instrument]!
  31. instrument(id: ID!): Instrument
  32. uploads: [File]
  33. me: User!
  34. }
  35. type Mutation {
  36. createInstrument(id: ID, name: String!, manufacturer: String!, description: String, picture: ID, interfaces: [String]!, documents: [FileUpload]!, commands: [InstrumentCommandInput]!): Instrument!
  37. createCharacterization(name: String!, projectVersion: ID!): Characterization!
  38. createUser(name: String!, email: String!, abbreviation: String!, password: String!): User!
  39. createProject(name: String!, abbreviation: String!, description: String): Project!
  40. createProjectVersion(name: String!, date: String!, project: ID!, changes: [String]): ProjectVersion!
  41. userLogin(email: String!, password: String!): User!
  42. userLogout: String!
  43. uploadFiles(files: [Upload!]!, name: String!, description: String!): String!
  44. }