Created
July 7, 2019 15:52
-
-
Save endlessdev/e9ade29a201823e1bc745380def8dc75 to your computer and use it in GitHub Desktop.
Prisma Tutorial 1
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
// Code generated by Prisma ([email protected]). DO NOT EDIT. | |
// Please don't change this file manually but run `prisma generate` to update it. | |
// For more information, please read the docs: https://www.prisma.io/docs/prisma-client/ | |
import { DocumentNode } from "graphql"; | |
import { | |
makePrismaClientClass, | |
BaseClientOptions, | |
Model | |
} from "prisma-client-lib"; | |
import { typeDefs } from "./prisma-schema"; | |
export type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> & | |
U[keyof U]; | |
export type Maybe<T> = T | undefined | null; | |
export interface Exists { | |
account: (where?: AccountWhereInput) => Promise<boolean>; | |
post: (where?: PostWhereInput) => Promise<boolean>; | |
profile: (where?: ProfileWhereInput) => Promise<boolean>; | |
} | |
export interface Node {} | |
export type FragmentableArray<T> = Promise<Array<T>> & Fragmentable; | |
export interface Fragmentable { | |
$fragment<T>(fragment: string | DocumentNode): Promise<T>; | |
} | |
export interface Prisma { | |
$exists: Exists; | |
$graphql: <T = any>( | |
query: string, | |
variables?: { [key: string]: any } | |
) => Promise<T>; | |
/** | |
* Queries | |
*/ | |
account: (where: AccountWhereUniqueInput) => AccountNullablePromise; | |
accounts: (args?: { | |
where?: AccountWhereInput; | |
orderBy?: AccountOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => FragmentableArray<Account>; | |
accountsConnection: (args?: { | |
where?: AccountWhereInput; | |
orderBy?: AccountOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => AccountConnectionPromise; | |
post: (where: PostWhereUniqueInput) => PostNullablePromise; | |
posts: (args?: { | |
where?: PostWhereInput; | |
orderBy?: PostOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => FragmentableArray<Post>; | |
postsConnection: (args?: { | |
where?: PostWhereInput; | |
orderBy?: PostOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => PostConnectionPromise; | |
profile: (where: ProfileWhereUniqueInput) => ProfileNullablePromise; | |
profiles: (args?: { | |
where?: ProfileWhereInput; | |
orderBy?: ProfileOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => FragmentableArray<Profile>; | |
profilesConnection: (args?: { | |
where?: ProfileWhereInput; | |
orderBy?: ProfileOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => ProfileConnectionPromise; | |
node: (args: { id: ID_Output }) => Node; | |
/** | |
* Mutations | |
*/ | |
createAccount: (data: AccountCreateInput) => AccountPromise; | |
updateAccount: (args: { | |
data: AccountUpdateInput; | |
where: AccountWhereUniqueInput; | |
}) => AccountPromise; | |
updateManyAccounts: (args: { | |
data: AccountUpdateManyMutationInput; | |
where?: AccountWhereInput; | |
}) => BatchPayloadPromise; | |
upsertAccount: (args: { | |
where: AccountWhereUniqueInput; | |
create: AccountCreateInput; | |
update: AccountUpdateInput; | |
}) => AccountPromise; | |
deleteAccount: (where: AccountWhereUniqueInput) => AccountPromise; | |
deleteManyAccounts: (where?: AccountWhereInput) => BatchPayloadPromise; | |
createPost: (data: PostCreateInput) => PostPromise; | |
updatePost: (args: { | |
data: PostUpdateInput; | |
where: PostWhereUniqueInput; | |
}) => PostPromise; | |
updateManyPosts: (args: { | |
data: PostUpdateManyMutationInput; | |
where?: PostWhereInput; | |
}) => BatchPayloadPromise; | |
upsertPost: (args: { | |
where: PostWhereUniqueInput; | |
create: PostCreateInput; | |
update: PostUpdateInput; | |
}) => PostPromise; | |
deletePost: (where: PostWhereUniqueInput) => PostPromise; | |
deleteManyPosts: (where?: PostWhereInput) => BatchPayloadPromise; | |
createProfile: (data: ProfileCreateInput) => ProfilePromise; | |
updateProfile: (args: { | |
data: ProfileUpdateInput; | |
where: ProfileWhereUniqueInput; | |
}) => ProfilePromise; | |
updateManyProfiles: (args: { | |
data: ProfileUpdateManyMutationInput; | |
where?: ProfileWhereInput; | |
}) => BatchPayloadPromise; | |
upsertProfile: (args: { | |
where: ProfileWhereUniqueInput; | |
create: ProfileCreateInput; | |
update: ProfileUpdateInput; | |
}) => ProfilePromise; | |
deleteProfile: (where: ProfileWhereUniqueInput) => ProfilePromise; | |
deleteManyProfiles: (where?: ProfileWhereInput) => BatchPayloadPromise; | |
/** | |
* Subscriptions | |
*/ | |
$subscribe: Subscription; | |
} | |
export interface Subscription { | |
account: ( | |
where?: AccountSubscriptionWhereInput | |
) => AccountSubscriptionPayloadSubscription; | |
post: ( | |
where?: PostSubscriptionWhereInput | |
) => PostSubscriptionPayloadSubscription; | |
profile: ( | |
where?: ProfileSubscriptionWhereInput | |
) => ProfileSubscriptionPayloadSubscription; | |
} | |
export interface ClientConstructor<T> { | |
new (options?: BaseClientOptions): T; | |
} | |
/** | |
* Types | |
*/ | |
export type PostOrderByInput = | |
| "id_ASC" | |
| "id_DESC" | |
| "content_ASC" | |
| "content_DESC" | |
| "createdAt_ASC" | |
| "createdAt_DESC" | |
| "updatedAt_ASC" | |
| "updatedAt_DESC"; | |
export type AccountOrderByInput = | |
| "id_ASC" | |
| "id_DESC" | |
| "email_ASC" | |
| "email_DESC" | |
| "createdAt_ASC" | |
| "createdAt_DESC" | |
| "updatedAt_ASC" | |
| "updatedAt_DESC"; | |
export type ProfileOrderByInput = | |
| "id_ASC" | |
| "id_DESC" | |
| "bio_ASC" | |
| "bio_DESC" | |
| "websiteURL_ASC" | |
| "websiteURL_DESC" | |
| "createdAt_ASC" | |
| "createdAt_DESC" | |
| "updatedAt_ASC" | |
| "updatedAt_DESC"; | |
export type MutationType = "CREATED" | "UPDATED" | "DELETED"; | |
export interface ProfileUpsertWithoutAccountInput { | |
update: ProfileUpdateWithoutAccountDataInput; | |
create: ProfileCreateWithoutAccountInput; | |
} | |
export type AccountWhereUniqueInput = AtLeastOne<{ | |
id: Maybe<ID_Input>; | |
}>; | |
export interface PostUpdateWithoutAuthorDataInput { | |
content?: Maybe<String>; | |
} | |
export interface PostWhereInput { | |
id?: Maybe<ID_Input>; | |
id_not?: Maybe<ID_Input>; | |
id_in?: Maybe<ID_Input[] | ID_Input>; | |
id_not_in?: Maybe<ID_Input[] | ID_Input>; | |
id_lt?: Maybe<ID_Input>; | |
id_lte?: Maybe<ID_Input>; | |
id_gt?: Maybe<ID_Input>; | |
id_gte?: Maybe<ID_Input>; | |
id_contains?: Maybe<ID_Input>; | |
id_not_contains?: Maybe<ID_Input>; | |
id_starts_with?: Maybe<ID_Input>; | |
id_not_starts_with?: Maybe<ID_Input>; | |
id_ends_with?: Maybe<ID_Input>; | |
id_not_ends_with?: Maybe<ID_Input>; | |
content?: Maybe<String>; | |
content_not?: Maybe<String>; | |
content_in?: Maybe<String[] | String>; | |
content_not_in?: Maybe<String[] | String>; | |
content_lt?: Maybe<String>; | |
content_lte?: Maybe<String>; | |
content_gt?: Maybe<String>; | |
content_gte?: Maybe<String>; | |
content_contains?: Maybe<String>; | |
content_not_contains?: Maybe<String>; | |
content_starts_with?: Maybe<String>; | |
content_not_starts_with?: Maybe<String>; | |
content_ends_with?: Maybe<String>; | |
content_not_ends_with?: Maybe<String>; | |
author?: Maybe<AccountWhereInput>; | |
createdAt?: Maybe<DateTimeInput>; | |
createdAt_not?: Maybe<DateTimeInput>; | |
createdAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_lt?: Maybe<DateTimeInput>; | |
createdAt_lte?: Maybe<DateTimeInput>; | |
createdAt_gt?: Maybe<DateTimeInput>; | |
createdAt_gte?: Maybe<DateTimeInput>; | |
updatedAt?: Maybe<DateTimeInput>; | |
updatedAt_not?: Maybe<DateTimeInput>; | |
updatedAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_lt?: Maybe<DateTimeInput>; | |
updatedAt_lte?: Maybe<DateTimeInput>; | |
updatedAt_gt?: Maybe<DateTimeInput>; | |
updatedAt_gte?: Maybe<DateTimeInput>; | |
AND?: Maybe<PostWhereInput[] | PostWhereInput>; | |
OR?: Maybe<PostWhereInput[] | PostWhereInput>; | |
NOT?: Maybe<PostWhereInput[] | PostWhereInput>; | |
} | |
export interface PostUpsertWithWhereUniqueWithoutAuthorInput { | |
where: PostWhereUniqueInput; | |
update: PostUpdateWithoutAuthorDataInput; | |
create: PostCreateWithoutAuthorInput; | |
} | |
export interface ProfileWhereInput { | |
id?: Maybe<ID_Input>; | |
id_not?: Maybe<ID_Input>; | |
id_in?: Maybe<ID_Input[] | ID_Input>; | |
id_not_in?: Maybe<ID_Input[] | ID_Input>; | |
id_lt?: Maybe<ID_Input>; | |
id_lte?: Maybe<ID_Input>; | |
id_gt?: Maybe<ID_Input>; | |
id_gte?: Maybe<ID_Input>; | |
id_contains?: Maybe<ID_Input>; | |
id_not_contains?: Maybe<ID_Input>; | |
id_starts_with?: Maybe<ID_Input>; | |
id_not_starts_with?: Maybe<ID_Input>; | |
id_ends_with?: Maybe<ID_Input>; | |
id_not_ends_with?: Maybe<ID_Input>; | |
account?: Maybe<AccountWhereInput>; | |
bio?: Maybe<String>; | |
bio_not?: Maybe<String>; | |
bio_in?: Maybe<String[] | String>; | |
bio_not_in?: Maybe<String[] | String>; | |
bio_lt?: Maybe<String>; | |
bio_lte?: Maybe<String>; | |
bio_gt?: Maybe<String>; | |
bio_gte?: Maybe<String>; | |
bio_contains?: Maybe<String>; | |
bio_not_contains?: Maybe<String>; | |
bio_starts_with?: Maybe<String>; | |
bio_not_starts_with?: Maybe<String>; | |
bio_ends_with?: Maybe<String>; | |
bio_not_ends_with?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
websiteURL_not?: Maybe<String>; | |
websiteURL_in?: Maybe<String[] | String>; | |
websiteURL_not_in?: Maybe<String[] | String>; | |
websiteURL_lt?: Maybe<String>; | |
websiteURL_lte?: Maybe<String>; | |
websiteURL_gt?: Maybe<String>; | |
websiteURL_gte?: Maybe<String>; | |
websiteURL_contains?: Maybe<String>; | |
websiteURL_not_contains?: Maybe<String>; | |
websiteURL_starts_with?: Maybe<String>; | |
websiteURL_not_starts_with?: Maybe<String>; | |
websiteURL_ends_with?: Maybe<String>; | |
websiteURL_not_ends_with?: Maybe<String>; | |
createdAt?: Maybe<DateTimeInput>; | |
createdAt_not?: Maybe<DateTimeInput>; | |
createdAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_lt?: Maybe<DateTimeInput>; | |
createdAt_lte?: Maybe<DateTimeInput>; | |
createdAt_gt?: Maybe<DateTimeInput>; | |
createdAt_gte?: Maybe<DateTimeInput>; | |
updatedAt?: Maybe<DateTimeInput>; | |
updatedAt_not?: Maybe<DateTimeInput>; | |
updatedAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_lt?: Maybe<DateTimeInput>; | |
updatedAt_lte?: Maybe<DateTimeInput>; | |
updatedAt_gt?: Maybe<DateTimeInput>; | |
updatedAt_gte?: Maybe<DateTimeInput>; | |
AND?: Maybe<ProfileWhereInput[] | ProfileWhereInput>; | |
OR?: Maybe<ProfileWhereInput[] | ProfileWhereInput>; | |
NOT?: Maybe<ProfileWhereInput[] | ProfileWhereInput>; | |
} | |
export interface ProfileCreateOneWithoutAccountInput { | |
create?: Maybe<ProfileCreateWithoutAccountInput>; | |
connect?: Maybe<ProfileWhereUniqueInput>; | |
} | |
export interface PostCreateInput { | |
id?: Maybe<ID_Input>; | |
content: String; | |
author: AccountCreateOneWithoutPostsInput; | |
} | |
export interface ProfileCreateWithoutAccountInput { | |
id?: Maybe<ID_Input>; | |
bio?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
} | |
export interface PostScalarWhereInput { | |
id?: Maybe<ID_Input>; | |
id_not?: Maybe<ID_Input>; | |
id_in?: Maybe<ID_Input[] | ID_Input>; | |
id_not_in?: Maybe<ID_Input[] | ID_Input>; | |
id_lt?: Maybe<ID_Input>; | |
id_lte?: Maybe<ID_Input>; | |
id_gt?: Maybe<ID_Input>; | |
id_gte?: Maybe<ID_Input>; | |
id_contains?: Maybe<ID_Input>; | |
id_not_contains?: Maybe<ID_Input>; | |
id_starts_with?: Maybe<ID_Input>; | |
id_not_starts_with?: Maybe<ID_Input>; | |
id_ends_with?: Maybe<ID_Input>; | |
id_not_ends_with?: Maybe<ID_Input>; | |
content?: Maybe<String>; | |
content_not?: Maybe<String>; | |
content_in?: Maybe<String[] | String>; | |
content_not_in?: Maybe<String[] | String>; | |
content_lt?: Maybe<String>; | |
content_lte?: Maybe<String>; | |
content_gt?: Maybe<String>; | |
content_gte?: Maybe<String>; | |
content_contains?: Maybe<String>; | |
content_not_contains?: Maybe<String>; | |
content_starts_with?: Maybe<String>; | |
content_not_starts_with?: Maybe<String>; | |
content_ends_with?: Maybe<String>; | |
content_not_ends_with?: Maybe<String>; | |
createdAt?: Maybe<DateTimeInput>; | |
createdAt_not?: Maybe<DateTimeInput>; | |
createdAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_lt?: Maybe<DateTimeInput>; | |
createdAt_lte?: Maybe<DateTimeInput>; | |
createdAt_gt?: Maybe<DateTimeInput>; | |
createdAt_gte?: Maybe<DateTimeInput>; | |
updatedAt?: Maybe<DateTimeInput>; | |
updatedAt_not?: Maybe<DateTimeInput>; | |
updatedAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_lt?: Maybe<DateTimeInput>; | |
updatedAt_lte?: Maybe<DateTimeInput>; | |
updatedAt_gt?: Maybe<DateTimeInput>; | |
updatedAt_gte?: Maybe<DateTimeInput>; | |
AND?: Maybe<PostScalarWhereInput[] | PostScalarWhereInput>; | |
OR?: Maybe<PostScalarWhereInput[] | PostScalarWhereInput>; | |
NOT?: Maybe<PostScalarWhereInput[] | PostScalarWhereInput>; | |
} | |
export interface PostCreateManyWithoutAuthorInput { | |
create?: Maybe<PostCreateWithoutAuthorInput[] | PostCreateWithoutAuthorInput>; | |
connect?: Maybe<PostWhereUniqueInput[] | PostWhereUniqueInput>; | |
} | |
export interface PostSubscriptionWhereInput { | |
mutation_in?: Maybe<MutationType[] | MutationType>; | |
updatedFields_contains?: Maybe<String>; | |
updatedFields_contains_every?: Maybe<String[] | String>; | |
updatedFields_contains_some?: Maybe<String[] | String>; | |
node?: Maybe<PostWhereInput>; | |
AND?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>; | |
OR?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>; | |
NOT?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>; | |
} | |
export interface PostCreateWithoutAuthorInput { | |
id?: Maybe<ID_Input>; | |
content: String; | |
} | |
export interface ProfileUpdateManyMutationInput { | |
bio?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
} | |
export interface AccountUpdateInput { | |
email?: Maybe<String>; | |
profile?: Maybe<ProfileUpdateOneRequiredWithoutAccountInput>; | |
posts?: Maybe<PostUpdateManyWithoutAuthorInput>; | |
} | |
export interface AccountUpdateWithoutProfileDataInput { | |
email?: Maybe<String>; | |
posts?: Maybe<PostUpdateManyWithoutAuthorInput>; | |
} | |
export interface ProfileUpdateOneRequiredWithoutAccountInput { | |
create?: Maybe<ProfileCreateWithoutAccountInput>; | |
update?: Maybe<ProfileUpdateWithoutAccountDataInput>; | |
upsert?: Maybe<ProfileUpsertWithoutAccountInput>; | |
connect?: Maybe<ProfileWhereUniqueInput>; | |
} | |
export interface AccountUpdateOneRequiredWithoutProfileInput { | |
create?: Maybe<AccountCreateWithoutProfileInput>; | |
update?: Maybe<AccountUpdateWithoutProfileDataInput>; | |
upsert?: Maybe<AccountUpsertWithoutProfileInput>; | |
connect?: Maybe<AccountWhereUniqueInput>; | |
} | |
export interface ProfileUpdateWithoutAccountDataInput { | |
bio?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
} | |
export interface AccountCreateWithoutProfileInput { | |
id?: Maybe<ID_Input>; | |
email: String; | |
posts?: Maybe<PostCreateManyWithoutAuthorInput>; | |
} | |
export interface AccountUpdateWithoutPostsDataInput { | |
email?: Maybe<String>; | |
profile?: Maybe<ProfileUpdateOneRequiredWithoutAccountInput>; | |
} | |
export interface AccountCreateOneWithoutProfileInput { | |
create?: Maybe<AccountCreateWithoutProfileInput>; | |
connect?: Maybe<AccountWhereUniqueInput>; | |
} | |
export interface PostUpdateManyWithoutAuthorInput { | |
create?: Maybe<PostCreateWithoutAuthorInput[] | PostCreateWithoutAuthorInput>; | |
delete?: Maybe<PostWhereUniqueInput[] | PostWhereUniqueInput>; | |
connect?: Maybe<PostWhereUniqueInput[] | PostWhereUniqueInput>; | |
set?: Maybe<PostWhereUniqueInput[] | PostWhereUniqueInput>; | |
disconnect?: Maybe<PostWhereUniqueInput[] | PostWhereUniqueInput>; | |
update?: Maybe< | |
| PostUpdateWithWhereUniqueWithoutAuthorInput[] | |
| PostUpdateWithWhereUniqueWithoutAuthorInput | |
>; | |
upsert?: Maybe< | |
| PostUpsertWithWhereUniqueWithoutAuthorInput[] | |
| PostUpsertWithWhereUniqueWithoutAuthorInput | |
>; | |
deleteMany?: Maybe<PostScalarWhereInput[] | PostScalarWhereInput>; | |
updateMany?: Maybe< | |
PostUpdateManyWithWhereNestedInput[] | PostUpdateManyWithWhereNestedInput | |
>; | |
} | |
export interface PostUpdateManyMutationInput { | |
content?: Maybe<String>; | |
} | |
export interface PostUpdateWithWhereUniqueWithoutAuthorInput { | |
where: PostWhereUniqueInput; | |
data: PostUpdateWithoutAuthorDataInput; | |
} | |
export interface ProfileSubscriptionWhereInput { | |
mutation_in?: Maybe<MutationType[] | MutationType>; | |
updatedFields_contains?: Maybe<String>; | |
updatedFields_contains_every?: Maybe<String[] | String>; | |
updatedFields_contains_some?: Maybe<String[] | String>; | |
node?: Maybe<ProfileWhereInput>; | |
AND?: Maybe<ProfileSubscriptionWhereInput[] | ProfileSubscriptionWhereInput>; | |
OR?: Maybe<ProfileSubscriptionWhereInput[] | ProfileSubscriptionWhereInput>; | |
NOT?: Maybe<ProfileSubscriptionWhereInput[] | ProfileSubscriptionWhereInput>; | |
} | |
export interface AccountWhereInput { | |
id?: Maybe<ID_Input>; | |
id_not?: Maybe<ID_Input>; | |
id_in?: Maybe<ID_Input[] | ID_Input>; | |
id_not_in?: Maybe<ID_Input[] | ID_Input>; | |
id_lt?: Maybe<ID_Input>; | |
id_lte?: Maybe<ID_Input>; | |
id_gt?: Maybe<ID_Input>; | |
id_gte?: Maybe<ID_Input>; | |
id_contains?: Maybe<ID_Input>; | |
id_not_contains?: Maybe<ID_Input>; | |
id_starts_with?: Maybe<ID_Input>; | |
id_not_starts_with?: Maybe<ID_Input>; | |
id_ends_with?: Maybe<ID_Input>; | |
id_not_ends_with?: Maybe<ID_Input>; | |
email?: Maybe<String>; | |
email_not?: Maybe<String>; | |
email_in?: Maybe<String[] | String>; | |
email_not_in?: Maybe<String[] | String>; | |
email_lt?: Maybe<String>; | |
email_lte?: Maybe<String>; | |
email_gt?: Maybe<String>; | |
email_gte?: Maybe<String>; | |
email_contains?: Maybe<String>; | |
email_not_contains?: Maybe<String>; | |
email_starts_with?: Maybe<String>; | |
email_not_starts_with?: Maybe<String>; | |
email_ends_with?: Maybe<String>; | |
email_not_ends_with?: Maybe<String>; | |
profile?: Maybe<ProfileWhereInput>; | |
posts_every?: Maybe<PostWhereInput>; | |
posts_some?: Maybe<PostWhereInput>; | |
posts_none?: Maybe<PostWhereInput>; | |
createdAt?: Maybe<DateTimeInput>; | |
createdAt_not?: Maybe<DateTimeInput>; | |
createdAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
createdAt_lt?: Maybe<DateTimeInput>; | |
createdAt_lte?: Maybe<DateTimeInput>; | |
createdAt_gt?: Maybe<DateTimeInput>; | |
createdAt_gte?: Maybe<DateTimeInput>; | |
updatedAt?: Maybe<DateTimeInput>; | |
updatedAt_not?: Maybe<DateTimeInput>; | |
updatedAt_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_not_in?: Maybe<DateTimeInput[] | DateTimeInput>; | |
updatedAt_lt?: Maybe<DateTimeInput>; | |
updatedAt_lte?: Maybe<DateTimeInput>; | |
updatedAt_gt?: Maybe<DateTimeInput>; | |
updatedAt_gte?: Maybe<DateTimeInput>; | |
AND?: Maybe<AccountWhereInput[] | AccountWhereInput>; | |
OR?: Maybe<AccountWhereInput[] | AccountWhereInput>; | |
NOT?: Maybe<AccountWhereInput[] | AccountWhereInput>; | |
} | |
export interface AccountUpsertWithoutProfileInput { | |
update: AccountUpdateWithoutProfileDataInput; | |
create: AccountCreateWithoutProfileInput; | |
} | |
export interface AccountUpdateOneRequiredWithoutPostsInput { | |
create?: Maybe<AccountCreateWithoutPostsInput>; | |
update?: Maybe<AccountUpdateWithoutPostsDataInput>; | |
upsert?: Maybe<AccountUpsertWithoutPostsInput>; | |
connect?: Maybe<AccountWhereUniqueInput>; | |
} | |
export interface ProfileUpdateInput { | |
account?: Maybe<AccountUpdateOneRequiredWithoutProfileInput>; | |
bio?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
} | |
export interface PostUpdateInput { | |
content?: Maybe<String>; | |
author?: Maybe<AccountUpdateOneRequiredWithoutPostsInput>; | |
} | |
export interface ProfileCreateInput { | |
id?: Maybe<ID_Input>; | |
account: AccountCreateOneWithoutProfileInput; | |
bio?: Maybe<String>; | |
websiteURL?: Maybe<String>; | |
} | |
export interface PostUpdateManyWithWhereNestedInput { | |
where: PostScalarWhereInput; | |
data: PostUpdateManyDataInput; | |
} | |
export interface AccountCreateInput { | |
id?: Maybe<ID_Input>; | |
email: String; | |
profile: ProfileCreateOneWithoutAccountInput; | |
posts?: Maybe<PostCreateManyWithoutAuthorInput>; | |
} | |
export interface AccountCreateOneWithoutPostsInput { | |
create?: Maybe<AccountCreateWithoutPostsInput>; | |
connect?: Maybe<AccountWhereUniqueInput>; | |
} | |
export interface AccountCreateWithoutPostsInput { | |
id?: Maybe<ID_Input>; | |
email: String; | |
profile: ProfileCreateOneWithoutAccountInput; | |
} | |
export interface AccountUpdateManyMutationInput { | |
email?: Maybe<String>; | |
} | |
export interface PostUpdateManyDataInput { | |
content?: Maybe<String>; | |
} | |
export interface AccountSubscriptionWhereInput { | |
mutation_in?: Maybe<MutationType[] | MutationType>; | |
updatedFields_contains?: Maybe<String>; | |
updatedFields_contains_every?: Maybe<String[] | String>; | |
updatedFields_contains_some?: Maybe<String[] | String>; | |
node?: Maybe<AccountWhereInput>; | |
AND?: Maybe<AccountSubscriptionWhereInput[] | AccountSubscriptionWhereInput>; | |
OR?: Maybe<AccountSubscriptionWhereInput[] | AccountSubscriptionWhereInput>; | |
NOT?: Maybe<AccountSubscriptionWhereInput[] | AccountSubscriptionWhereInput>; | |
} | |
export interface AccountUpsertWithoutPostsInput { | |
update: AccountUpdateWithoutPostsDataInput; | |
create: AccountCreateWithoutPostsInput; | |
} | |
export type ProfileWhereUniqueInput = AtLeastOne<{ | |
id: Maybe<ID_Input>; | |
}>; | |
export type PostWhereUniqueInput = AtLeastOne<{ | |
id: Maybe<ID_Input>; | |
}>; | |
export interface NodeNode { | |
id: ID_Output; | |
} | |
export interface ProfilePreviousValues { | |
id: ID_Output; | |
bio?: String; | |
websiteURL?: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface ProfilePreviousValuesPromise | |
extends Promise<ProfilePreviousValues>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
bio: () => Promise<String>; | |
websiteURL: () => Promise<String>; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface ProfilePreviousValuesSubscription | |
extends Promise<AsyncIterator<ProfilePreviousValues>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
bio: () => Promise<AsyncIterator<String>>; | |
websiteURL: () => Promise<AsyncIterator<String>>; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface PostEdge { | |
node: Post; | |
cursor: String; | |
} | |
export interface PostEdgePromise extends Promise<PostEdge>, Fragmentable { | |
node: <T = PostPromise>() => T; | |
cursor: () => Promise<String>; | |
} | |
export interface PostEdgeSubscription | |
extends Promise<AsyncIterator<PostEdge>>, | |
Fragmentable { | |
node: <T = PostSubscription>() => T; | |
cursor: () => Promise<AsyncIterator<String>>; | |
} | |
export interface AccountConnection { | |
pageInfo: PageInfo; | |
edges: AccountEdge[]; | |
} | |
export interface AccountConnectionPromise | |
extends Promise<AccountConnection>, | |
Fragmentable { | |
pageInfo: <T = PageInfoPromise>() => T; | |
edges: <T = FragmentableArray<AccountEdge>>() => T; | |
aggregate: <T = AggregateAccountPromise>() => T; | |
} | |
export interface AccountConnectionSubscription | |
extends Promise<AsyncIterator<AccountConnection>>, | |
Fragmentable { | |
pageInfo: <T = PageInfoSubscription>() => T; | |
edges: <T = Promise<AsyncIterator<AccountEdgeSubscription>>>() => T; | |
aggregate: <T = AggregateAccountSubscription>() => T; | |
} | |
export interface PostConnection { | |
pageInfo: PageInfo; | |
edges: PostEdge[]; | |
} | |
export interface PostConnectionPromise | |
extends Promise<PostConnection>, | |
Fragmentable { | |
pageInfo: <T = PageInfoPromise>() => T; | |
edges: <T = FragmentableArray<PostEdge>>() => T; | |
aggregate: <T = AggregatePostPromise>() => T; | |
} | |
export interface PostConnectionSubscription | |
extends Promise<AsyncIterator<PostConnection>>, | |
Fragmentable { | |
pageInfo: <T = PageInfoSubscription>() => T; | |
edges: <T = Promise<AsyncIterator<PostEdgeSubscription>>>() => T; | |
aggregate: <T = AggregatePostSubscription>() => T; | |
} | |
export interface AggregateAccount { | |
count: Int; | |
} | |
export interface AggregateAccountPromise | |
extends Promise<AggregateAccount>, | |
Fragmentable { | |
count: () => Promise<Int>; | |
} | |
export interface AggregateAccountSubscription | |
extends Promise<AsyncIterator<AggregateAccount>>, | |
Fragmentable { | |
count: () => Promise<AsyncIterator<Int>>; | |
} | |
export interface BatchPayload { | |
count: Long; | |
} | |
export interface BatchPayloadPromise | |
extends Promise<BatchPayload>, | |
Fragmentable { | |
count: () => Promise<Long>; | |
} | |
export interface BatchPayloadSubscription | |
extends Promise<AsyncIterator<BatchPayload>>, | |
Fragmentable { | |
count: () => Promise<AsyncIterator<Long>>; | |
} | |
export interface ProfileSubscriptionPayload { | |
mutation: MutationType; | |
node: Profile; | |
updatedFields: String[]; | |
previousValues: ProfilePreviousValues; | |
} | |
export interface ProfileSubscriptionPayloadPromise | |
extends Promise<ProfileSubscriptionPayload>, | |
Fragmentable { | |
mutation: () => Promise<MutationType>; | |
node: <T = ProfilePromise>() => T; | |
updatedFields: () => Promise<String[]>; | |
previousValues: <T = ProfilePreviousValuesPromise>() => T; | |
} | |
export interface ProfileSubscriptionPayloadSubscription | |
extends Promise<AsyncIterator<ProfileSubscriptionPayload>>, | |
Fragmentable { | |
mutation: () => Promise<AsyncIterator<MutationType>>; | |
node: <T = ProfileSubscription>() => T; | |
updatedFields: () => Promise<AsyncIterator<String[]>>; | |
previousValues: <T = ProfilePreviousValuesSubscription>() => T; | |
} | |
export interface AccountEdge { | |
node: Account; | |
cursor: String; | |
} | |
export interface AccountEdgePromise extends Promise<AccountEdge>, Fragmentable { | |
node: <T = AccountPromise>() => T; | |
cursor: () => Promise<String>; | |
} | |
export interface AccountEdgeSubscription | |
extends Promise<AsyncIterator<AccountEdge>>, | |
Fragmentable { | |
node: <T = AccountSubscription>() => T; | |
cursor: () => Promise<AsyncIterator<String>>; | |
} | |
export interface AggregateProfile { | |
count: Int; | |
} | |
export interface AggregateProfilePromise | |
extends Promise<AggregateProfile>, | |
Fragmentable { | |
count: () => Promise<Int>; | |
} | |
export interface AggregateProfileSubscription | |
extends Promise<AsyncIterator<AggregateProfile>>, | |
Fragmentable { | |
count: () => Promise<AsyncIterator<Int>>; | |
} | |
export interface PostSubscriptionPayload { | |
mutation: MutationType; | |
node: Post; | |
updatedFields: String[]; | |
previousValues: PostPreviousValues; | |
} | |
export interface PostSubscriptionPayloadPromise | |
extends Promise<PostSubscriptionPayload>, | |
Fragmentable { | |
mutation: () => Promise<MutationType>; | |
node: <T = PostPromise>() => T; | |
updatedFields: () => Promise<String[]>; | |
previousValues: <T = PostPreviousValuesPromise>() => T; | |
} | |
export interface PostSubscriptionPayloadSubscription | |
extends Promise<AsyncIterator<PostSubscriptionPayload>>, | |
Fragmentable { | |
mutation: () => Promise<AsyncIterator<MutationType>>; | |
node: <T = PostSubscription>() => T; | |
updatedFields: () => Promise<AsyncIterator<String[]>>; | |
previousValues: <T = PostPreviousValuesSubscription>() => T; | |
} | |
export interface ProfileConnection { | |
pageInfo: PageInfo; | |
edges: ProfileEdge[]; | |
} | |
export interface ProfileConnectionPromise | |
extends Promise<ProfileConnection>, | |
Fragmentable { | |
pageInfo: <T = PageInfoPromise>() => T; | |
edges: <T = FragmentableArray<ProfileEdge>>() => T; | |
aggregate: <T = AggregateProfilePromise>() => T; | |
} | |
export interface ProfileConnectionSubscription | |
extends Promise<AsyncIterator<ProfileConnection>>, | |
Fragmentable { | |
pageInfo: <T = PageInfoSubscription>() => T; | |
edges: <T = Promise<AsyncIterator<ProfileEdgeSubscription>>>() => T; | |
aggregate: <T = AggregateProfileSubscription>() => T; | |
} | |
export interface AggregatePost { | |
count: Int; | |
} | |
export interface AggregatePostPromise | |
extends Promise<AggregatePost>, | |
Fragmentable { | |
count: () => Promise<Int>; | |
} | |
export interface AggregatePostSubscription | |
extends Promise<AsyncIterator<AggregatePost>>, | |
Fragmentable { | |
count: () => Promise<AsyncIterator<Int>>; | |
} | |
export interface AccountPreviousValues { | |
id: ID_Output; | |
email: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface AccountPreviousValuesPromise | |
extends Promise<AccountPreviousValues>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
email: () => Promise<String>; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface AccountPreviousValuesSubscription | |
extends Promise<AsyncIterator<AccountPreviousValues>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
email: () => Promise<AsyncIterator<String>>; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface AccountSubscriptionPayload { | |
mutation: MutationType; | |
node: Account; | |
updatedFields: String[]; | |
previousValues: AccountPreviousValues; | |
} | |
export interface AccountSubscriptionPayloadPromise | |
extends Promise<AccountSubscriptionPayload>, | |
Fragmentable { | |
mutation: () => Promise<MutationType>; | |
node: <T = AccountPromise>() => T; | |
updatedFields: () => Promise<String[]>; | |
previousValues: <T = AccountPreviousValuesPromise>() => T; | |
} | |
export interface AccountSubscriptionPayloadSubscription | |
extends Promise<AsyncIterator<AccountSubscriptionPayload>>, | |
Fragmentable { | |
mutation: () => Promise<AsyncIterator<MutationType>>; | |
node: <T = AccountSubscription>() => T; | |
updatedFields: () => Promise<AsyncIterator<String[]>>; | |
previousValues: <T = AccountPreviousValuesSubscription>() => T; | |
} | |
export interface Account { | |
id: ID_Output; | |
email: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface AccountPromise extends Promise<Account>, Fragmentable { | |
id: () => Promise<ID_Output>; | |
email: () => Promise<String>; | |
profile: <T = ProfilePromise>() => T; | |
posts: <T = FragmentableArray<Post>>(args?: { | |
where?: PostWhereInput; | |
orderBy?: PostOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => T; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface AccountSubscription | |
extends Promise<AsyncIterator<Account>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
email: () => Promise<AsyncIterator<String>>; | |
profile: <T = ProfileSubscription>() => T; | |
posts: <T = Promise<AsyncIterator<PostSubscription>>>(args?: { | |
where?: PostWhereInput; | |
orderBy?: PostOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => T; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface AccountNullablePromise | |
extends Promise<Account | null>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
email: () => Promise<String>; | |
profile: <T = ProfilePromise>() => T; | |
posts: <T = FragmentableArray<Post>>(args?: { | |
where?: PostWhereInput; | |
orderBy?: PostOrderByInput; | |
skip?: Int; | |
after?: String; | |
before?: String; | |
first?: Int; | |
last?: Int; | |
}) => T; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface PageInfo { | |
hasNextPage: Boolean; | |
hasPreviousPage: Boolean; | |
startCursor?: String; | |
endCursor?: String; | |
} | |
export interface PageInfoPromise extends Promise<PageInfo>, Fragmentable { | |
hasNextPage: () => Promise<Boolean>; | |
hasPreviousPage: () => Promise<Boolean>; | |
startCursor: () => Promise<String>; | |
endCursor: () => Promise<String>; | |
} | |
export interface PageInfoSubscription | |
extends Promise<AsyncIterator<PageInfo>>, | |
Fragmentable { | |
hasNextPage: () => Promise<AsyncIterator<Boolean>>; | |
hasPreviousPage: () => Promise<AsyncIterator<Boolean>>; | |
startCursor: () => Promise<AsyncIterator<String>>; | |
endCursor: () => Promise<AsyncIterator<String>>; | |
} | |
export interface Post { | |
id: ID_Output; | |
content: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface PostPromise extends Promise<Post>, Fragmentable { | |
id: () => Promise<ID_Output>; | |
content: () => Promise<String>; | |
author: <T = AccountPromise>() => T; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface PostSubscription | |
extends Promise<AsyncIterator<Post>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
content: () => Promise<AsyncIterator<String>>; | |
author: <T = AccountSubscription>() => T; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface PostNullablePromise | |
extends Promise<Post | null>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
content: () => Promise<String>; | |
author: <T = AccountPromise>() => T; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface PostPreviousValues { | |
id: ID_Output; | |
content: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface PostPreviousValuesPromise | |
extends Promise<PostPreviousValues>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
content: () => Promise<String>; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface PostPreviousValuesSubscription | |
extends Promise<AsyncIterator<PostPreviousValues>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
content: () => Promise<AsyncIterator<String>>; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface ProfileEdge { | |
node: Profile; | |
cursor: String; | |
} | |
export interface ProfileEdgePromise extends Promise<ProfileEdge>, Fragmentable { | |
node: <T = ProfilePromise>() => T; | |
cursor: () => Promise<String>; | |
} | |
export interface ProfileEdgeSubscription | |
extends Promise<AsyncIterator<ProfileEdge>>, | |
Fragmentable { | |
node: <T = ProfileSubscription>() => T; | |
cursor: () => Promise<AsyncIterator<String>>; | |
} | |
export interface Profile { | |
id: ID_Output; | |
bio?: String; | |
websiteURL?: String; | |
createdAt: DateTimeOutput; | |
updatedAt: DateTimeOutput; | |
} | |
export interface ProfilePromise extends Promise<Profile>, Fragmentable { | |
id: () => Promise<ID_Output>; | |
account: <T = AccountPromise>() => T; | |
bio: () => Promise<String>; | |
websiteURL: () => Promise<String>; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
export interface ProfileSubscription | |
extends Promise<AsyncIterator<Profile>>, | |
Fragmentable { | |
id: () => Promise<AsyncIterator<ID_Output>>; | |
account: <T = AccountSubscription>() => T; | |
bio: () => Promise<AsyncIterator<String>>; | |
websiteURL: () => Promise<AsyncIterator<String>>; | |
createdAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
updatedAt: () => Promise<AsyncIterator<DateTimeOutput>>; | |
} | |
export interface ProfileNullablePromise | |
extends Promise<Profile | null>, | |
Fragmentable { | |
id: () => Promise<ID_Output>; | |
account: <T = AccountPromise>() => T; | |
bio: () => Promise<String>; | |
websiteURL: () => Promise<String>; | |
createdAt: () => Promise<DateTimeOutput>; | |
updatedAt: () => Promise<DateTimeOutput>; | |
} | |
/* | |
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. | |
*/ | |
export type Int = number; | |
export type Long = string; | |
/* | |
DateTime scalar input type, allowing Date | |
*/ | |
export type DateTimeInput = Date | string; | |
/* | |
DateTime scalar output type, which is always a string | |
*/ | |
export type DateTimeOutput = string; | |
/* | |
The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. | |
*/ | |
export type ID_Input = string | number; | |
export type ID_Output = string; | |
/* | |
The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. | |
*/ | |
export type String = string; | |
/* | |
The `Boolean` scalar type represents `true` or `false`. | |
*/ | |
export type Boolean = boolean; | |
/** | |
* Model Metadata | |
*/ | |
export const models: Model[] = [ | |
{ | |
name: "Account", | |
embedded: false | |
}, | |
{ | |
name: "Profile", | |
embedded: false | |
}, | |
{ | |
name: "Post", | |
embedded: false | |
} | |
]; | |
/** | |
* Type Defs | |
*/ | |
export const Prisma = makePrismaClientClass<ClientConstructor<Prisma>>({ | |
typeDefs, | |
models, | |
endpoint: `http://localhost:4466` | |
}); | |
export const prisma = new Prisma(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment