ozon-task/graph/schema/mutation.graphqls
erius e0aa12b126 Separated graphql schema into multiple files and moved them to graph/schema dir, update the gqlgen.yml accordingly
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
2024-06-26 04:45:04 +03:00

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!
}