Update subproject commit and enhance VSCode settings; refactor imports and formatting in center.schema.ts; add docwriter style to settings.json
This commit is contained in:
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependi.npm.lockFileEnabled": false,
|
||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
||||
"compile-hero.disable-compile-files-on-did-save-code": true
|
||||
}
|
||||
"compile-hero.disable-compile-files-on-did-save-code": true,
|
||||
"docwriter.style": "JSDoc"
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common'
|
||||
import {Inject, Injectable, Logger} from '@nestjs/common'
|
||||
import {
|
||||
Pothos,
|
||||
PothosRef,
|
||||
PothosSchema,
|
||||
SchemaBuilderToken,
|
||||
} from '@smatch-corp/nestjs-pothos'
|
||||
import { Builder } from '../Graphql/graphql.builder'
|
||||
import { PrismaService } from '../Prisma/prisma.service'
|
||||
import { MinioService } from '../Minio/minio.service'
|
||||
import { CenterStatus, Role } from '@prisma/client'
|
||||
import { MailService } from '../Mail/mail.service'
|
||||
import {Builder} from '../Graphql/graphql.builder'
|
||||
import {PrismaService} from '../Prisma/prisma.service'
|
||||
import {MinioService} from '../Minio/minio.service'
|
||||
import {CenterStatus, Role} from '@prisma/client'
|
||||
import {MailService} from '../Mail/mail.service'
|
||||
|
||||
@Injectable()
|
||||
export class CenterSchema extends PothosSchema {
|
||||
constructor(
|
||||
@@ -70,8 +71,8 @@ export class CenterSchema extends PothosSchema {
|
||||
nullable: true,
|
||||
description: 'Whether the center is an individual center.',
|
||||
}),
|
||||
createdAt: t.expose('createdAt', { type: 'DateTime' }),
|
||||
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
|
||||
createdAt: t.expose('createdAt', {type: 'DateTime'}),
|
||||
updatedAt: t.expose('updatedAt', {type: 'DateTime'}),
|
||||
services: t.relation('services', {
|
||||
description: 'The services provided by the center.',
|
||||
}),
|
||||
@@ -132,7 +133,7 @@ export class CenterSchema extends PothosSchema {
|
||||
type: this.center(),
|
||||
description: 'Retrieve a single center by its unique identifier.',
|
||||
args: {
|
||||
userId: t.arg({ type: 'String', required: true }),
|
||||
userId: t.arg({type: 'String', required: true}),
|
||||
},
|
||||
resolve: async (_query, _root, args) => {
|
||||
return await this.prisma.center.findFirst({
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user