forked from nestjs/nest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphql.schema.ts
More file actions
executable file
·48 lines (38 loc) · 1.05 KB
/
Copy pathgraphql.schema.ts
File metadata and controls
executable file
·48 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* -------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/
/* tslint:disable */
/* eslint-disable */
export class NewPost {
title: string;
text: string;
}
export class UpdatePost {
id: string;
title?: Nullable<string>;
text?: Nullable<string>;
isPublished?: Nullable<boolean>;
}
export class Post {
id: string;
title: string;
text: string;
isPublished: boolean;
}
export abstract class IQuery {
abstract posts(): Post[] | Promise<Post[]>;
abstract post(id: string): Nullable<Post> | Promise<Nullable<Post>>;
}
export abstract class IMutation {
abstract createPost(input: NewPost): Post | Promise<Post>;
abstract updatePost(
input: UpdatePost,
): Nullable<Post> | Promise<Nullable<Post>>;
abstract deletePost(id: string): Nullable<Post> | Promise<Nullable<Post>>;
}
export abstract class ISubscription {
abstract postCreated(): Nullable<Post> | Promise<Nullable<Post>>;
}
type Nullable<T> = T | null;