nodejsdeveloperskh

auto-generated-sdl-without-oneOf

Oct 16th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | Software | 0 0
  1. """
  2. Indicates exactly one field must be supplied and this field must not be `null`.
  3. """
  4. directive @oneOf on INPUT_OBJECT
  5.  
  6. input AdminUserInput {
  7. email: String!
  8. }
  9.  
  10. """How CPU usage should be returned"""
  11. enum CpuState {
  12. FREE
  13. IN_USE
  14. }
  15.  
  16. input CreateTodoInputDto {
  17. assignedToId: ID
  18. content: String!
  19. createdById: ID!
  20. title: String!
  21. }
  22.  
  23. input CreateUserInputDto {
  24. username: String!
  25. }
  26.  
  27. input DefineUserInput {
  28. admin: AdminUserInput
  29. moderator: ModeratorUserInput
  30. }
  31.  
  32. input ModeratorUserInput {
  33. accessRights: [String!]!
  34. email: String!
  35. }
  36.  
  37. type Mutation {
  38. createTodo(input: CreateTodoInputDto!): Todo!
  39. createUser(input: CreateUserInputDto!): User!
  40. test(input: TestInput!): Boolean!
  41. testOneOf(input: DefineUserInput!): Boolean!
  42. }
  43.  
  44. type Query {
  45. getTodo(id: ID!): Todo
  46. }
  47.  
  48. input SomeField {
  49. some: Float!
  50. }
  51.  
  52. type Subscription {
  53. greet: String!
  54. top: Top!
  55. }
  56.  
  57. input TestInput {
  58. someField: SomeField!
  59. }
  60.  
  61. type Todo {
  62. AssignedTo: User!
  63. CreatedBy: User!
  64. assignedToId: ID!
  65. content: String!
  66. createdAt: String!
  67. createdById: ID!
  68. id: ID!
  69. title: String!
  70. updatedAt: String!
  71. }
  72.  
  73. type Top {
  74. """Server's CPU usage."""
  75. cpu(cpuState: CpuState!): Int!
  76.  
  77. """Server's memory usage."""
  78. memory(unit: Unit!): Float!
  79. }
  80.  
  81. """Supported units for stats"""
  82. enum Unit {
  83. BYTE
  84. GIGABYTE
  85. KILOBYTE
  86. MEGABYTE
  87. }
  88.  
  89. type User {
  90. createdAt: String!
  91. id: ID!
  92. updatedAt: String!
  93. username: String!
  94. }
  95.  
Advertisement
Add Comment
Please, Sign In to add comment