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
22 lines
352 B
GraphQL
22 lines
352 B
GraphQL
type Mutation {
|
|
addPost(input: PostInput!): AddResult!
|
|
addComment(input: CommentInput!): AddResult!
|
|
}
|
|
|
|
input PostInput {
|
|
title: String!
|
|
author: String!
|
|
contents: String!
|
|
allowComments: Boolean! = true
|
|
}
|
|
|
|
input CommentInput {
|
|
parentPostId: ID
|
|
parentCommentId: ID
|
|
author: String!
|
|
contents: String!
|
|
}
|
|
|
|
type AddResult {
|
|
itemId: ID!
|
|
}
|