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,
|
"dependi.npm.lockFileEnabled": false,
|
||||||
"typescript.tsdk": "node_modules\\typescript\\lib",
|
"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 {
|
import {
|
||||||
Pothos,
|
Pothos,
|
||||||
PothosRef,
|
PothosRef,
|
||||||
PothosSchema,
|
PothosSchema,
|
||||||
SchemaBuilderToken,
|
SchemaBuilderToken,
|
||||||
} from '@smatch-corp/nestjs-pothos'
|
} from '@smatch-corp/nestjs-pothos'
|
||||||
import { Builder } from '../Graphql/graphql.builder'
|
import {Builder} from '../Graphql/graphql.builder'
|
||||||
import { PrismaService } from '../Prisma/prisma.service'
|
import {PrismaService} from '../Prisma/prisma.service'
|
||||||
import { MinioService } from '../Minio/minio.service'
|
import {MinioService} from '../Minio/minio.service'
|
||||||
import { CenterStatus, Role } from '@prisma/client'
|
import {CenterStatus, Role} from '@prisma/client'
|
||||||
import { MailService } from '../Mail/mail.service'
|
import {MailService} from '../Mail/mail.service'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CenterSchema extends PothosSchema {
|
export class CenterSchema extends PothosSchema {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -70,8 +71,8 @@ export class CenterSchema extends PothosSchema {
|
|||||||
nullable: true,
|
nullable: true,
|
||||||
description: 'Whether the center is an individual center.',
|
description: 'Whether the center is an individual center.',
|
||||||
}),
|
}),
|
||||||
createdAt: t.expose('createdAt', { type: 'DateTime' }),
|
createdAt: t.expose('createdAt', {type: 'DateTime'}),
|
||||||
updatedAt: t.expose('updatedAt', { type: 'DateTime' }),
|
updatedAt: t.expose('updatedAt', {type: 'DateTime'}),
|
||||||
services: t.relation('services', {
|
services: t.relation('services', {
|
||||||
description: 'The services provided by the center.',
|
description: 'The services provided by the center.',
|
||||||
}),
|
}),
|
||||||
@@ -132,7 +133,7 @@ export class CenterSchema extends PothosSchema {
|
|||||||
type: this.center(),
|
type: this.center(),
|
||||||
description: 'Retrieve a single center by its unique identifier.',
|
description: 'Retrieve a single center by its unique identifier.',
|
||||||
args: {
|
args: {
|
||||||
userId: t.arg({ type: 'String', required: true }),
|
userId: t.arg({type: 'String', required: true}),
|
||||||
},
|
},
|
||||||
resolve: async (_query, _root, args) => {
|
resolve: async (_query, _root, args) => {
|
||||||
return await this.prisma.center.findFirst({
|
return await this.prisma.center.findFirst({
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user