erius
e0aa12b126
Removed unnecesary bindings for ID and Int in gqlgen.yml Minor changes to Makefile docker-clean target Reduced docker-compose postgres healthcheck interval for faster local db connections Added pagination to graphql schema, the paginated queries are WIP Removed unneeded fields from the model structs Added allowComment check when adding comments Switched gorm logger to Info mode App now panics if the specified APP_STORAGE in env doesn't exist Reworked database methods, still barely working and are WIP
21 lines
400 B
GraphQL
21 lines
400 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!
|
|
}
|