erius
8fce488888
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
21 lines
397 B
GraphQL
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!
|
|
}
|