All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m36s
Move Query/Mutation field declarations from the monolithic schema.graphql into each domain's .graphql file using extend type, so gqlgen places resolvers in the matching *.resolvers.go files. Extract helper functions into *_helpers.go files to prevent gqlgen from commenting them out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
456 B
GraphQL
30 lines
456 B
GraphQL
type Post {
|
|
id: ID!
|
|
createdAt: Time!
|
|
updatedAt: Time!
|
|
title: String!
|
|
author: User
|
|
content: String!
|
|
}
|
|
|
|
input CreatePostInput {
|
|
title: String!
|
|
content: String!
|
|
}
|
|
|
|
input UpdatePostInput {
|
|
title: String!
|
|
content: String!
|
|
}
|
|
|
|
extend type Query {
|
|
posts: [Post!]!
|
|
post(id: ID!): Post
|
|
}
|
|
|
|
extend type Mutation {
|
|
createPost(input: CreatePostInput!): Post!
|
|
updatePost(id: ID!, input: UpdatePostInput!): Post!
|
|
deletePost(id: ID!): Post!
|
|
}
|