mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2026-12-02 10:36:42 -06:00
PR-393405:
chore: update dependencies and version to 1.6.0 feat: refactor GraphQL resolvers for improved structure and functionality - Split TestResolver into TestResolverQuery and TestResolverMutation - Implement FieldResolvers for dynamic data fetching fix: update import paths for graphql-ws to use new module structure chore: add ESLint configuration for improved code quality - Migrate from previous ESLint config to a new structure with TypeScript support style: update TypeScript target to ES2021 for better compatibility
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
||||
'use strict';
|
||||
|
||||
import { Field, ObjectType, Arg } from 'type-graphql';
|
||||
import { getTest, addText } from '@controllerGraphQL';
|
||||
import { Field, ObjectType } from 'type-graphql';
|
||||
|
||||
@ObjectType()
|
||||
export class Test {
|
||||
@Field(() => String)
|
||||
async text(){
|
||||
return await getTest({});
|
||||
}
|
||||
text?: string;
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
export class TestMutation {
|
||||
@Field(() => String)
|
||||
async text(@Arg('text') text?: string){
|
||||
return await addText({text});
|
||||
}
|
||||
text?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user