Skip to content

Commit

Permalink
fix codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
kgtkr committed Jan 17, 2024
1 parent 9123ad1 commit 3bc0e30
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ const config: CodegenConfig = {
},
}),
},
hooks: {
afterAllFileWrite: ["prettier --write"],
},
};
export default config;
8 changes: 4 additions & 4 deletions packages/server/src/schema/base/resolvers/ValidateData.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ValidateDataResolvers } from './../../types.generated';
export const ValidateData: ValidateDataResolvers = {
/* Implement ValidateData resolver logic here */
};
import type { ValidateDataResolvers } from "./../../types.generated";
export const ValidateData: ValidateDataResolvers = {
/* Implement ValidateData resolver logic here */
};
8 changes: 4 additions & 4 deletions packages/server/src/schema/client/resolvers/Client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ClientResolvers } from './../../types.generated';
export const Client: ClientResolvers = {
/* Implement Client resolver logic here */
};
import type { ClientResolvers } from "./../../types.generated";
export const Client: ClientResolvers = {
/* Implement Client resolver logic here */
};
2 changes: 1 addition & 1 deletion packages/server/src/schema/history/resolvers/History.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ export const History: HistoryResolvers = {
throw new Error();
}
return topic;
}
},
};
8 changes: 4 additions & 4 deletions packages/server/src/schema/profile/resolvers/Profile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ProfileResolvers } from './../../types.generated';
export const Profile: ProfileResolvers = {
/* Implement Profile resolver logic here */
};
import type { ProfileResolvers } from "./../../types.generated";
export const Profile: ProfileResolvers = {
/* Implement Profile resolver logic here */
};
3 changes: 0 additions & 3 deletions packages/server/src/schema/token/resolvers/TokenGeneral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ export const TokenGeneral: TokenGeneralResolvers = {
const client = await context.ports.clientLoader.load(token.clientID);
return client.toAPI(context.ports.authContainer.getTokenMasterOrNull());
},
date: () => { /* TokenGeneral.date resolver is required because TokenGeneral.date exists but TokenGeneralMapper.date does not */ },
id: () => { /* TokenGeneral.id resolver is required because TokenGeneral.id exists but TokenGeneralMapper.id does not */ },
key: () => { /* TokenGeneral.key resolver is required because TokenGeneral.key exists but TokenGeneralMapper.key does not */ }
};
7 changes: 5 additions & 2 deletions packages/server/src/server/auth-from-api-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ITokenRepo, IUserRepo } from "../ports";
import { AtAuthError } from "../at-error";

import { isNullish } from "@kgtkr/utils";
import * as G from "../generated/graphql";

export async function tokenHeaderToToken(
tokenRepo: ITokenRepo,
Expand All @@ -18,7 +17,11 @@ export async function tokenHeaderToToken(

export async function authUserRequestToUser(
userRepo: IUserRepo,
apiParamUser: G.AuthUser
apiParamUser: {
id?: string | null;
pass: string;
sn?: string | null;
}
): Promise<IAuthUser> {
let id;
if (!isNullish(apiParamUser.id) && isNullish(apiParamUser.sn)) {
Expand Down

0 comments on commit 3bc0e30

Please sign in to comment.