diff --git a/typings/gen-types.ts b/typings/gen-types.ts new file mode 100644 index 000000000..87b835f6c --- /dev/null +++ b/typings/gen-types.ts @@ -0,0 +1,67 @@ +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +/** 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; + allUsers?: Maybe>>; + search: Array; + myChats: Array; +}; + + +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; + messages: Array; +}; + +export type ChatMessage = Node & { + __typename?: 'ChatMessage'; + id: Scalars['ID']; + content: Scalars['String']; + time: Scalars['Date']; + user: User; +};