Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Article {
- author: Profile!
- body: String!
- comments(first: Int, after: String): CommentsConnection
- createdAt: String!
- description: String!
- favorited: Boolean!
- favoritesCount: Int!
- slug: String!
- tags: [String],
- title: String!
- updatedAt: String!
- }
- type ArticleEdge {
- cursor: String!
- node: Article
- }
- type ArticlesConnection {
- count: Int!
- edges: [ArticleEdge]
- pageInfo: PageInfo!
- }
- type Comment {
- author: Profile!
- article: Article!
- body: String!
- createdAt: String!
- updatedAt: String!
- }
- type CommentEdge {
- cursor: String!
- node: Comment
- }
- type CommentsConnection {
- count: Int!
- edges: [CommentEdge]
- pageInfo: PageInfo!
- }
- type DeletionStatus {
- success: Boolean!
- }
- type PageInfo {
- endCursor: String
- hasNextPage: Boolean!
- hasPreviousPage: Boolean!
- startCursor: String
- }
- type Profile {
- articles(first: Int, after: String): ArticlesConnection
- bio: String!
- comments(first: Int, after: String): CommentsConnection
- favorites(first: Int, after: String): ArticlesConnection
- following: Boolean!
- image: String
- user: User!
- }
- type User {
- email: String!
- profile: Profile!
- token: String!
- username: String!
- }
- # Input types.
- input ArticleChanges {
- body: String
- description: String
- title: String
- }
- input ArticleInput {
- body: String!
- description: String!
- tags: [String]
- title: String!
- }
- input UserChanges {
- bio: String
- email: String
- image: String
- password: String
- username: String
- }
- # Build the schema.
- type Query {
- article(slug: String!): Article
- articles(
- first: Int,
- after: String,
- authoredBy: String
- favoritedBy: String
- withTag: String
- ): ArticlesConnection
- currentUser: User
- feed(first: Int, after: String): ArticlesConnection
- profile(username: String!): Profile
- tags: [String]
- }
- type Mutation {
- addComment(slug: String!, body: String!): Comment
- authenticate(password: String!, email: String!): User
- createArticle(input: ArticleInput!)
- deleteArticle(slug: String!): DeletionStatus
- deleteComment(id: ID!): DeletionStatus
- favoriteArticle(slug: String!): Article
- followUser(username: String!): Profile
- unfollowUser(username: String!): Profile
- updateArticle(changes: ArticleChanges!): Article
- updateUser(changes: UserChanges!): User
- }
- schema {
- query: Query
- mutation: Mutation
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement