Some refactoring. dev script, graphql dir.
This commit is contained in:
11
backend/graphql/generate.typings.ts
Normal file
11
backend/graphql/generate.typings.ts
Normal 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,
|
||||
});
|
||||
35
backend/graphql/graphql.typings.ts
Normal file
35
backend/graphql/graphql.typings.ts
Normal 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;
|
||||
Reference in New Issue
Block a user