-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Rogalskiy
committed
Mar 18, 2022
1 parent
842243a
commit ed6bc0c
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
export type Maybe<T> = T | null; | ||
export type InputMaybe<T> = Maybe<T>; | ||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] }; | ||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> }; | ||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> }; | ||
/** All built-in and custom scalars, mapped to their actual values */ | ||
export type Scalars = { | ||
ID: string; | ||
String: string; | ||
Boolean: boolean; | ||
Int: number; | ||
Float: number; | ||
Date: any; | ||
}; | ||
|
||
export type Query = { | ||
__typename?: 'Query'; | ||
me: User; | ||
user?: Maybe<User>; | ||
allUsers?: Maybe<Array<Maybe<User>>>; | ||
search: Array<SearchResult>; | ||
myChats: Array<Chat>; | ||
}; | ||
|
||
|
||
export type QueryUserArgs = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
|
||
export type QuerySearchArgs = { | ||
term: Scalars['String']; | ||
}; | ||
|
||
export enum Role { | ||
User = 'USER', | ||
Admin = 'ADMIN' | ||
} | ||
|
||
export type Node = { | ||
id: Scalars['ID']; | ||
}; | ||
|
||
export type SearchResult = User | Chat | ChatMessage; | ||
|
||
export type User = Node & { | ||
__typename?: 'User'; | ||
id: Scalars['ID']; | ||
username: Scalars['String']; | ||
email: Scalars['String']; | ||
role: Role; | ||
}; | ||
|
||
export type Chat = Node & { | ||
__typename?: 'Chat'; | ||
id: Scalars['ID']; | ||
users: Array<User>; | ||
messages: Array<ChatMessage>; | ||
}; | ||
|
||
export type ChatMessage = Node & { | ||
__typename?: 'ChatMessage'; | ||
id: Scalars['ID']; | ||
content: Scalars['String']; | ||
time: Scalars['Date']; | ||
user: User; | ||
}; |