Guest User

Untitled

a guest
Aug 6th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. interface Node {
  2. id: ID!
  3. }
  4.  
  5. type User {
  6. id: ID!
  7. username: String!
  8. aliasname: String
  9. email: String
  10. brithday: Date
  11. posts: [Post!]!
  12. }
  13.  
  14. type Post implements Node {
  15. id: ID!
  16. title: String!
  17. text: String!
  18. isPublished: Boolean!
  19. author: User!
  20. createdAt: DateTime!
  21. updatedAt: DateTime!
  22. deletedAt: DateTime!
  23. }
  24.  
  25. type Query {
  26. me: User
  27. user(id: ID!): User
  28. feed: [Post!]!
  29. drafts: [Post!]!
  30. post(id: ID!): Post
  31. }
  32.  
  33. type Mutation {
  34. signup(email: String!, password: String!, username: String!): User!
  35. login(email: String!, password: String!): User!
  36. publish(id: ID!): Post!
  37. deletePost(id: ID!): Post!
  38. }
  39.  
  40. ### all
  41.  
  42. type Query {
  43. feed: [Post!]!
  44. drafts: [Post!]!
  45. post(id: ID!): Post
  46. me: User
  47. }
  48.  
  49. enum MutationType {
  50. CREATED
  51. UPDATED
  52. DELETED
  53. }
  54.  
  55. type PageInfo {
  56. hasNextPage: Boolean!
  57. hasPreviousPage: Boolean!
  58. startCursor: String
  59. endCursor: String
  60. }
Add Comment
Please, Sign In to add comment