ozon-task/graph/schema/query.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

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