Some refactoring. dev script, graphql dir.

This commit is contained in:
2022-09-08 19:21:20 +02:00
parent 1bcf265aec
commit 31e7aec64d
5 changed files with 40 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
import { GraphQLDefinitionsFactory } from '@nestjs/graphql';
import { join } from 'path';
const definitionFactory = new GraphQLDefinitionsFactory();
definitionFactory.generate({
typePaths: ['./**/*.graphql'],
path: join(process.cwd(), 'src/graphql/graphql.typings.ts'),
outputAs: 'class',
watch: true,
});

View File

@@ -0,0 +1,35 @@
/*
* -------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/
/* tslint:disable */
/* eslint-disable */
export class CreateUserInput {
email: string;
password: string;
}
export class User {
id: string;
email: string;
time_joined: number;
}
export abstract class IQuery {
abstract users(): Nullable<User>[] | Promise<Nullable<User>[]>;
abstract user(id: string): Nullable<User> | Promise<Nullable<User>>;
}
export abstract class IMutation {
abstract createUser(createUserInput: CreateUserInput): User | Promise<User>;
abstract removeUser(id: string): Nullable<User> | Promise<Nullable<User>>;
}
export type DateTime = any;
type Nullable<T> = T | null;