From 5e0aeee87e556bb3c1453a08e16344a3c50ad2ee Mon Sep 17 00:00:00 2001 From: Mike de Geofroy Date: Sun, 20 Oct 2024 20:32:54 +0300 Subject: [PATCH] removed stat edit handle on graphql --- src/stats/stats.resolver.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/stats/stats.resolver.ts b/src/stats/stats.resolver.ts index 5f95869..2b5b022 100644 --- a/src/stats/stats.resolver.ts +++ b/src/stats/stats.resolver.ts @@ -1,12 +1,8 @@ -import { Args, Mutation, Query, Resolver, Subscription } from '@nestjs/graphql'; +import { Query, Resolver, Subscription } from '@nestjs/graphql'; import { StatsService } from './stats.service'; import { Stat } from './stat.entity'; -import { CreateStatInput } from './dto/create-stat.input'; import { PubSubService } from 'src/pub-sub/pub-sub.service'; -// todo -// add security features so not anybody can deface the website ;) - @Resolver(() => Stat) export class StatsResolver { constructor( @@ -19,13 +15,6 @@ export class StatsResolver { return this.statService.findLatest(); } - @Mutation(() => Stat) - async createStat( - @Args('createStatInput') createStatInput: CreateStatInput - ): Promise { - return await this.statService.createStat(createStatInput); - } - @Subscription(() => [Stat]) statCreated() { return this.pubSubService.getPubSub().asyncIterator('statCreated');