Removing Prisma and Grapql-nestjs-prisma resolvers (#2574)
* Some cleaning * Fix seeds * Fix all sign in, sign up flow and apiKey optimistic rendering * Fix
This commit is contained in:
@ -1,57 +0,0 @@
|
||||
import { PrismaSelect as PalJSPrismaSelect } from '@paljs/plugins';
|
||||
import { DMMF } from '@prisma/client/runtime';
|
||||
import { GraphQLResolveInfo } from 'graphql';
|
||||
|
||||
import { ModelSelectMap } from './model-select-map';
|
||||
|
||||
export type DefaultFieldsMap = {
|
||||
readonly [K in keyof ModelSelectMap]?:
|
||||
| ModelSelectMap[K]
|
||||
| ((select: any) => ModelSelectMap[K]);
|
||||
};
|
||||
|
||||
export { ModelSelectMap };
|
||||
|
||||
export class PrismaSelect<
|
||||
K extends keyof ModelSelectMap,
|
||||
> extends PalJSPrismaSelect {
|
||||
private modelName: K;
|
||||
|
||||
constructor(
|
||||
modelName: K,
|
||||
info: GraphQLResolveInfo,
|
||||
options?: {
|
||||
readonly defaultFields?: DefaultFieldsMap;
|
||||
readonly dmmf?: readonly Pick<DMMF.Document, 'datamodel'>[];
|
||||
},
|
||||
) {
|
||||
super(info, options as any);
|
||||
this.modelName = modelName;
|
||||
}
|
||||
|
||||
get value(): ModelSelectMap[K] {
|
||||
return super.value;
|
||||
}
|
||||
|
||||
valueOf(field: string, mergeObject?: any): ModelSelectMap[K];
|
||||
valueOf<SubKey extends keyof ModelSelectMap>(
|
||||
field: string,
|
||||
filterBy: SubKey,
|
||||
mergeObject?: any,
|
||||
): ModelSelectMap[SubKey];
|
||||
valueOf(
|
||||
field: string,
|
||||
filterByOrMergeObject?: keyof ModelSelectMap | any,
|
||||
mergeObject?: any,
|
||||
) {
|
||||
if (typeof filterByOrMergeObject === 'string') {
|
||||
return super.valueOf(field, filterByOrMergeObject, mergeObject).select;
|
||||
} else {
|
||||
return super.valueOf(field, this.modelName, filterByOrMergeObject).select;
|
||||
}
|
||||
}
|
||||
|
||||
valueWithFilter(modelName: K): ModelSelectMap[K] {
|
||||
return super.valueWithFilter(modelName).select;
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
import { Prisma } from '@prisma/client';
|
||||
|
||||
export type ModelSelectMap = {
|
||||
User: Prisma.UserSelect;
|
||||
UserSettings: Prisma.UserSettingsSelect;
|
||||
Workspace: Prisma.WorkspaceSelect;
|
||||
WorkspaceMember: Prisma.WorkspaceMemberSelect;
|
||||
Company: Prisma.CompanySelect;
|
||||
Person: Prisma.PersonSelect;
|
||||
RefreshToken: Prisma.RefreshTokenSelect;
|
||||
Activity: Prisma.ActivitySelect;
|
||||
Comment: Prisma.CommentSelect;
|
||||
ActivityTarget: Prisma.ActivityTargetSelect;
|
||||
Pipeline: Prisma.PipelineSelect;
|
||||
PipelineStage: Prisma.PipelineStageSelect;
|
||||
PipelineProgress: Prisma.PipelineProgressSelect;
|
||||
Attachment: Prisma.AttachmentSelect;
|
||||
Favorite: Prisma.FavoriteSelect;
|
||||
ApiKey: Prisma.ApiKeySelect;
|
||||
WebHook: Prisma.WebHookSelect;
|
||||
};
|
||||
Reference in New Issue
Block a user