Refactor backend and add exception handlers (#189)
This commit is contained in:
@ -12,35 +12,78 @@ generator nestgraphql {
|
||||
provider = "node node_modules/prisma-nestjs-graphql"
|
||||
output = "../../src/api/@generated"
|
||||
|
||||
decorate_1_type = "*CommentThreadTargetCreateNestedManyWithoutCommentThreadInput"
|
||||
decorate_1_field = "!(createMany)"
|
||||
decorate_1_name = "HideField"
|
||||
decorate_1_from = "@nestjs/graphql"
|
||||
decorate_1_arguments = "[]"
|
||||
// CommentThread create: Only Allow targets createMany and comments createMany
|
||||
decorate_createCommentThreadTargets_type = "*CommentThreadTargetCreateNestedManyWithoutCommentThreadInput"
|
||||
decorate_createCommentThreadTargets_field = "!(createMany)"
|
||||
decorate_createCommentThreadTargets_name = "HideField"
|
||||
decorate_createCommentThreadTargets_from = "@nestjs/graphql"
|
||||
decorate_createCommentThreadTargets_arguments = "[]"
|
||||
|
||||
decorate_2_type = "*CommentCreateNestedManyWithoutCommentThreadInput"
|
||||
decorate_2_field = "!(createMany)"
|
||||
decorate_2_name = "HideField"
|
||||
decorate_2_from = "@nestjs/graphql"
|
||||
decorate_2_arguments = "[]"
|
||||
decorate_createCommentThreadComments_type = "*CommentCreateNestedManyWithoutCommentThreadInput"
|
||||
decorate_createCommentThreadComments_field = "!(createMany)"
|
||||
decorate_createCommentThreadComments_name = "HideField"
|
||||
decorate_createCommentThreadComments_from = "@nestjs/graphql"
|
||||
decorate_createCommentThreadComments_arguments = "[]"
|
||||
|
||||
decorate_3_type = "*UserCreateNestedOneWithoutCommentsInput"
|
||||
decorate_3_field = "!(connect)"
|
||||
decorate_3_name = "HideField"
|
||||
decorate_3_from = "@nestjs/graphql"
|
||||
decorate_3_arguments = "[]"
|
||||
// Comment create: Only Allow author connect and commentThread connect
|
||||
decorate_createCommentUser_type = "*UserCreateNestedOneWithoutCommentsInput"
|
||||
decorate_createCommentUser_field = "!(connect)"
|
||||
decorate_createCommentUser_name = "HideField"
|
||||
decorate_createCommentUser_from = "@nestjs/graphql"
|
||||
decorate_createCommentUser_arguments = "[]"
|
||||
|
||||
decorate_4_type = "*CommentThreadCreateNestedOneWithoutCommentsInput"
|
||||
decorate_4_field = "!(connect)"
|
||||
decorate_4_name = "HideField"
|
||||
decorate_4_from = "@nestjs/graphql"
|
||||
decorate_4_arguments = "[]"
|
||||
decorate_createCommentCommentThread_type = "*CommentThreadCreateNestedOneWithoutCommentsInput"
|
||||
decorate_createCommentCommentThread_field = "!(connect)"
|
||||
decorate_createCommentCommentThread_name = "HideField"
|
||||
decorate_createCommentCommentThread_from = "@nestjs/graphql"
|
||||
decorate_createCommentCommentThread_arguments = "[]"
|
||||
|
||||
decorate_5_type = "!(*Aggregate*|*GroupBy*|*OrderBy*)"
|
||||
decorate_5_field = "_count"
|
||||
decorate_5_name = "HideField"
|
||||
decorate_5_from = "@nestjs/graphql"
|
||||
decorate_5_arguments = "[]"
|
||||
// Person create: Only Allow company connect
|
||||
decorate_createPersonCompany_type = "*CompanyCreateNestedOneWithoutPeopleInput"
|
||||
decorate_createPersonCompany_field = "!(connect)"
|
||||
decorate_createPersonCompany_name = "HideField"
|
||||
decorate_createPersonCompany_from = "@nestjs/graphql"
|
||||
decorate_createPersonCompany_arguments = "[]"
|
||||
|
||||
// Person update: Only Allow company connect
|
||||
decorate_updatePersonCompany_type = "*CompanyUpdateOneWithoutPeopleNestedInput"
|
||||
decorate_updatePersonCompany_field = "!(connect)"
|
||||
decorate_updatePersonCompany_name = "HideField"
|
||||
decorate_updatePersonCompany_from = "@nestjs/graphql"
|
||||
decorate_updatePersonCompany_arguments = "[]"
|
||||
|
||||
// Company create: Only Allow people and accountOwner connect
|
||||
decorate_createCompanyUser_type = "*UserCreateNestedOneWithoutCompaniesInput"
|
||||
decorate_createCompanyUser_field = "!(connect)"
|
||||
decorate_createCompanyUser_name = "HideField"
|
||||
decorate_createCompanyUser_from = "@nestjs/graphql"
|
||||
decorate_createCompanyUser_arguments = "[]"
|
||||
|
||||
decorate_createCompanyPerson_type = "*PersonCreateNestedManyWithoutCompanyInput"
|
||||
decorate_createCompanyPerson_field = "!(connect)"
|
||||
decorate_createCompanyPerson_name = "HideField"
|
||||
decorate_createCompanyPerson_from = "@nestjs/graphql"
|
||||
decorate_createCompanyPerson_arguments = "[]"
|
||||
|
||||
// Company update: Only Allow action on people and accountOwner
|
||||
decorate_updateCompanyUser_type = "*UserUpdateOneWithoutCompaniesNestedInput"
|
||||
decorate_updateCompanyUser_field = "!(connect)"
|
||||
decorate_updateCompanyUser_name = "HideField"
|
||||
decorate_updateCompanyUser_from = "@nestjs/graphql"
|
||||
decorate_updateCompanyUser_arguments = "[]"
|
||||
|
||||
decorate_updateCompanyPerson_type = "*PersonUpdateManyWithoutCompanyNestedInput"
|
||||
decorate_updateCompanyPerson_field = "!(connect)"
|
||||
decorate_updateCompanyPerson_name = "HideField"
|
||||
decorate_updateCompanyPerson_from = "@nestjs/graphql"
|
||||
decorate_updateCompanyPerson_arguments = "[]"
|
||||
|
||||
// Disable _count on all models except Aggregation use case
|
||||
decorate_count_type = "!(*Aggregate*|*GroupBy*|*OrderBy*)"
|
||||
decorate_count_field = "_count"
|
||||
decorate_count_name = "HideField"
|
||||
decorate_count_from = "@nestjs/graphql"
|
||||
decorate_count_arguments = "[]"
|
||||
}
|
||||
|
||||
model User {
|
||||
|
||||
Reference in New Issue
Block a user