Split schema.graphql and schema.resolvers.go into per-domain files
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m36s
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>
This commit is contained in:
@@ -12,3 +12,11 @@ input CreateActivityInput {
|
||||
name: String!
|
||||
link: String
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
activities: [Activity!]!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createActivity(input: CreateActivityInput!): Activity!
|
||||
}
|
||||
|
||||
@@ -6,3 +6,13 @@ input LoginInput {
|
||||
type AuthPayload {
|
||||
user: User!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
me: User
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
login(input: LoginInput!): AuthPayload!
|
||||
logout: Boolean!
|
||||
refreshToken: AuthPayload!
|
||||
}
|
||||
|
||||
@@ -12,3 +12,12 @@ input CreateBookmarkInput {
|
||||
name: String!
|
||||
link: String!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
bookmarks: [Bookmark!]!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createBookmark(input: CreateBookmarkInput!): Bookmark!
|
||||
deleteBookmark(id: ID!): Bookmark!
|
||||
}
|
||||
|
||||
@@ -12,3 +12,11 @@ input CreateFavoriteInput {
|
||||
name: String!
|
||||
link: String
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
favorites: [Favorite!]!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createFavorite(input: CreateFavoriteInput!): Favorite!
|
||||
}
|
||||
|
||||
@@ -6,3 +6,7 @@ type GiteaFeedItem {
|
||||
commitMessage: String!
|
||||
createdAt: Time!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
giteaFeed: GiteaFeedItem
|
||||
}
|
||||
|
||||
@@ -21,3 +21,13 @@ input UpdateJobAppReferenceInput {
|
||||
value: String
|
||||
sortOrder: Int
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
jobAppReferences: [JobAppReference!]!
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createJobAppReference(input: CreateJobAppReferenceInput!): JobAppReference!
|
||||
updateJobAppReference(id: ID!, input: UpdateJobAppReferenceInput!): JobAppReference!
|
||||
deleteJobAppReference(id: ID!): Boolean!
|
||||
}
|
||||
|
||||
@@ -30,3 +30,14 @@ input UpdateJobApplicationInput {
|
||||
notes: String
|
||||
appliedAt: Time
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
jobApplications: [JobApplication!]!
|
||||
jobApplication(id: ID!): JobApplication
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createJobApplication(input: CreateJobApplicationInput!): JobApplication!
|
||||
updateJobApplication(id: ID!, input: UpdateJobApplicationInput!): JobApplication!
|
||||
deleteJobApplication(id: ID!): Boolean!
|
||||
}
|
||||
|
||||
@@ -5,3 +5,7 @@ type Message {
|
||||
fileUrl: String
|
||||
createdAt: Time!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
messages: [Message!]!
|
||||
}
|
||||
|
||||
@@ -16,3 +16,14 @@ 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!
|
||||
}
|
||||
|
||||
@@ -7,3 +7,7 @@ type Rowing {
|
||||
timePer500m: Float!
|
||||
calories: Float!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
rowingSessions: [Rowing!]!
|
||||
}
|
||||
|
||||
@@ -1,43 +1,4 @@
|
||||
scalar Time
|
||||
|
||||
type Query {
|
||||
users: [User!]!
|
||||
user(id: ID!): User
|
||||
posts: [Post!]!
|
||||
post(id: ID!): Post
|
||||
activities: [Activity!]!
|
||||
favorites: [Favorite!]!
|
||||
rowingSessions: [Rowing!]!
|
||||
messages: [Message!]!
|
||||
spotifyListening: SpotifyPlaying
|
||||
spotifyRecent: [SpotifyRecentItem!]
|
||||
giteaFeed: GiteaFeedItem
|
||||
steamStatus: SteamStatus
|
||||
me: User
|
||||
bookmarks: [Bookmark!]!
|
||||
jobApplications: [JobApplication!]!
|
||||
jobApplication(id: ID!): JobApplication
|
||||
jobAppReferences: [JobAppReference!]!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
login(input: LoginInput!): AuthPayload!
|
||||
logout: Boolean!
|
||||
refreshToken: AuthPayload!
|
||||
createPost(input: CreatePostInput!): Post!
|
||||
updatePost(id: ID!, input: UpdatePostInput!): Post!
|
||||
deletePost(id: ID!): Post!
|
||||
createUser(input: CreateUserInput!): User!
|
||||
deleteUser(id: ID!): User!
|
||||
setUserAdmin(id: ID!, admin: Boolean!): User!
|
||||
createFavorite(input: CreateFavoriteInput!): Favorite!
|
||||
createActivity(input: CreateActivityInput!): Activity!
|
||||
createJobApplication(input: CreateJobApplicationInput!): JobApplication!
|
||||
updateJobApplication(id: ID!, input: UpdateJobApplicationInput!): JobApplication!
|
||||
createBookmark(input: CreateBookmarkInput!): Bookmark!
|
||||
deleteBookmark(id: ID!): Bookmark!
|
||||
deleteJobApplication(id: ID!): Boolean!
|
||||
createJobAppReference(input: CreateJobAppReferenceInput!): JobAppReference!
|
||||
updateJobAppReference(id: ID!, input: UpdateJobAppReferenceInput!): JobAppReference!
|
||||
deleteJobAppReference(id: ID!): Boolean!
|
||||
}
|
||||
type Query
|
||||
type Mutation
|
||||
|
||||
@@ -26,3 +26,8 @@ type SpotifyRecentItem {
|
||||
track: SpotifyTrack!
|
||||
playedAt: Time!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
spotifyListening: SpotifyPlaying
|
||||
spotifyRecent: [SpotifyRecentItem!]
|
||||
}
|
||||
|
||||
@@ -10,3 +10,7 @@ type SteamStatus {
|
||||
online: Boolean!
|
||||
recentGames: [SteamGame!]!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
steamStatus: SteamStatus
|
||||
}
|
||||
|
||||
@@ -10,3 +10,14 @@ input CreateUserInput {
|
||||
username: String!
|
||||
password: String!
|
||||
}
|
||||
|
||||
extend type Query {
|
||||
users: [User!]!
|
||||
user(id: ID!): User
|
||||
}
|
||||
|
||||
extend type Mutation {
|
||||
createUser(input: CreateUserInput!): User!
|
||||
deleteUser(id: ID!): User!
|
||||
setUserAdmin(id: ID!, admin: Boolean!): User!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user