Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. type Article {
  2. author: Profile!
  3. body: String!
  4. comments(first: Int, after: String): CommentsConnection
  5. createdAt: String!
  6. description: String!
  7. favorited: Boolean!
  8. favoritesCount: Int!
  9. slug: String!
  10. tags: [String],
  11. title: String!
  12. updatedAt: String!
  13. }
  14.  
  15. type ArticleEdge {
  16. cursor: String!
  17. node: Article
  18. }
  19.  
  20. type ArticlesConnection {
  21. count: Int!
  22. edges: [ArticleEdge]
  23. pageInfo: PageInfo!
  24. }
  25.  
  26. type Comment {
  27. author: Profile!
  28. article: Article!
  29. body: String!
  30. createdAt: String!
  31. updatedAt: String!
  32. }
  33.  
  34. type CommentEdge {
  35. cursor: String!
  36. node: Comment
  37. }
  38.  
  39. type CommentsConnection {
  40. count: Int!
  41. edges: [CommentEdge]
  42. pageInfo: PageInfo!
  43. }
  44.  
  45. type DeletionStatus {
  46. success: Boolean!
  47. }
  48.  
  49. type PageInfo {
  50. endCursor: String
  51. hasNextPage: Boolean!
  52. hasPreviousPage: Boolean!
  53. startCursor: String
  54. }
  55.  
  56. type Profile {
  57. articles(first: Int, after: String): ArticlesConnection
  58. bio: String!
  59. comments(first: Int, after: String): CommentsConnection
  60. favorites(first: Int, after: String): ArticlesConnection
  61. following: Boolean!
  62. image: String
  63. user: User!
  64. }
  65.  
  66. type User {
  67. email: String!
  68. profile: Profile!
  69. token: String!
  70. username: String!
  71. }
  72.  
  73. # Input types.
  74. input ArticleChanges {
  75. body: String
  76. description: String
  77. title: String
  78. }
  79.  
  80. input ArticleInput {
  81. body: String!
  82. description: String!
  83. tags: [String]
  84. title: String!
  85. }
  86.  
  87. input UserChanges {
  88. bio: String
  89. email: String
  90. image: String
  91. password: String
  92. username: String
  93. }
  94.  
  95. # Build the schema.
  96. type Query {
  97. article(slug: String!): Article
  98. articles(
  99. first: Int,
  100. after: String,
  101. authoredBy: String
  102. favoritedBy: String
  103. withTag: String
  104. ): ArticlesConnection
  105. currentUser: User
  106. feed(first: Int, after: String): ArticlesConnection
  107. profile(username: String!): Profile
  108. tags: [String]
  109. }
  110.  
  111. type Mutation {
  112. addComment(slug: String!, body: String!): Comment
  113. authenticate(password: String!, email: String!): User
  114. createArticle(input: ArticleInput!)
  115. deleteArticle(slug: String!): DeletionStatus
  116. deleteComment(id: ID!): DeletionStatus
  117. favoriteArticle(slug: String!): Article
  118. followUser(username: String!): Profile
  119. unfollowUser(username: String!): Profile
  120. updateArticle(changes: ArticleChanges!): Article
  121. updateUser(changes: UserChanges!): User
  122. }
  123.  
  124. schema {
  125. query: Query
  126. mutation: Mutation
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement