fix(server): 500 error when Commit.author is null
This commit is contained in:
@@ -17,6 +17,7 @@ export = {
|
||||
Version: {
|
||||
async authorUser(parent, _args, ctx) {
|
||||
const { author } = parent
|
||||
if (!author) return null
|
||||
return (await ctx.loaders.users.getUser.load(author)) || null
|
||||
},
|
||||
async model(parent, _args, ctx) {
|
||||
|
||||
@@ -85,7 +85,7 @@ export type ServerInfo = ServerConfigRecord & {
|
||||
export type CommitRecord = {
|
||||
id: string
|
||||
referencedObject: string
|
||||
author: string
|
||||
author: Nullable<string>
|
||||
message: Nullable<string>
|
||||
createdAt: Date
|
||||
sourceApplication: Nullable<string>
|
||||
|
||||
Reference in New Issue
Block a user