chore: update configuration and improve schema imports

- Updated biome.json to include "graphql.d.ts" in the ignored files list.
- Updated subproject commit reference in epess-database to the latest version.
- Removed unused script from package.json and streamlined module file extensions in tsconfig.json.
- Consolidated exclude patterns in tsconfig.build.json for clarity.
- Refactored imports across multiple schema files for consistency and improved readability.
- Enhanced various schema files by ensuring proper import order and removing redundant code.
- Improved error handling and data integrity checks in several service and schema files.
This commit is contained in:
2024-12-08 20:49:52 +07:00
parent 9e6d62e4be
commit 10e20092ab
82 changed files with 1697 additions and 2259 deletions

View File

@@ -1,13 +1,8 @@
import { Inject, Injectable } from '@nestjs/common'
import {
Pothos,
PothosRef,
PothosSchema,
SchemaBuilderToken,
} from '@smatch-corp/nestjs-pothos'
import { ChatRoomType } from '@prisma/client'
import { Pothos, PothosRef, PothosSchema, SchemaBuilderToken } from '@smatch-corp/nestjs-pothos'
import { Builder } from '../Graphql/graphql.builder'
import { PrismaService } from '../Prisma/prisma.service'
import { ChatRoomType } from '@prisma/client'
@Injectable()
export class ChatroomSchema extends PothosSchema {
@@ -86,8 +81,7 @@ export class ChatroomSchema extends PothosSchema {
chatRooms: t.prismaField({
type: [this.chatRoom()],
description:
'Retrieve a list of chat rooms with optional filtering, ordering, and pagination.',
description: 'Retrieve a list of chat rooms with optional filtering, ordering, and pagination.',
args: this.builder.generator.findManyArgs('ChatRoom'),
resolve: async (query, _root, args, _ctx, _info) => {
return await this.prisma.chatRoom.findMany({