ozon-task/graph/schema/query.graphqls
erius 8fce488888 Implemented pagination for posts, comments and replies
TODO: use dataloaders to reduce amount of sql queries (figure out how to batch query nested paginated data) and add some basic unit or integrated testing
2024-06-27 04:28:18 +03:00

21 lines
397 B
GraphQL

type Query {
post(id: ID!): Post!
posts(first: ID!, after: ID): PostsConnection!
comment(id: ID!): Comment!
}
type Post {
id: ID!
title: String!
author: String!
contents: String!
comments(first: ID!, after: ID): CommentsConnection!
allowComments: Boolean!
}
type Comment {
id: ID!
author: String!
contents: String!
replies(first: ID!, after: ID): CommentsConnection!
}