@trulyacerbic/ttt-gamesdb
Version:
Prisma graphql database model definition
458 lines (399 loc) • 12.1 kB
TypeScript
// Code generated by Prisma (prisma@1.29.2). 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 interface Exists {
gameSession: (where?: GameSessionWhereInput) => 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
*/
gameSession: (where: GameSessionWhereUniqueInput) => GameSessionPromise;
gameSessions: (
args?: {
where?: GameSessionWhereInput;
orderBy?: GameSessionOrderByInput;
skip?: Int;
after?: String;
before?: String;
first?: Int;
last?: Int;
}
) => FragmentableArray<GameSession>;
gameSessionsConnection: (
args?: {
where?: GameSessionWhereInput;
orderBy?: GameSessionOrderByInput;
skip?: Int;
after?: String;
before?: String;
first?: Int;
last?: Int;
}
) => GameSessionConnectionPromise;
node: (args: { id: ID_Output }) => Node;
/**
* Mutations
*/
createGameSession: (data: GameSessionCreateInput) => GameSessionPromise;
updateGameSession: (
args: { data: GameSessionUpdateInput; where: GameSessionWhereUniqueInput }
) => GameSessionPromise;
updateManyGameSessions: (
args: {
data: GameSessionUpdateManyMutationInput;
where?: GameSessionWhereInput;
}
) => BatchPayloadPromise;
upsertGameSession: (
args: {
where: GameSessionWhereUniqueInput;
create: GameSessionCreateInput;
update: GameSessionUpdateInput;
}
) => GameSessionPromise;
deleteGameSession: (where: GameSessionWhereUniqueInput) => GameSessionPromise;
deleteManyGameSessions: (
where?: GameSessionWhereInput
) => BatchPayloadPromise;
/**
* Subscriptions
*/
$subscribe: Subscription;
}
export interface Subscription {
gameSession: (
where?: GameSessionSubscriptionWhereInput
) => GameSessionSubscriptionPayloadSubscription;
}
export interface ClientConstructor<T> {
new (options?: BaseClientOptions): T;
}
/**
* Types
*/
export type GameSessionOrderByInput =
| "id_ASC"
| "id_DESC"
| "player1_ASC"
| "player1_DESC"
| "player2_ASC"
| "player2_DESC"
| "state_ASC"
| "state_DESC"
| "board_ASC"
| "board_DESC"
| "createdAt_ASC"
| "createdAt_DESC"
| "updatedAt_ASC"
| "updatedAt_DESC";
export type MutationType = "CREATED" | "UPDATED" | "DELETED";
export type GameSessionWhereUniqueInput = AtLeastOne<{
id: ID_Input;
}>;
export interface GameSessionWhereInput {
id?: ID_Input;
id_not?: ID_Input;
id_in?: ID_Input[] | ID_Input;
id_not_in?: ID_Input[] | ID_Input;
id_lt?: ID_Input;
id_lte?: ID_Input;
id_gt?: ID_Input;
id_gte?: ID_Input;
id_contains?: ID_Input;
id_not_contains?: ID_Input;
id_starts_with?: ID_Input;
id_not_starts_with?: ID_Input;
id_ends_with?: ID_Input;
id_not_ends_with?: ID_Input;
player1?: String;
player1_not?: String;
player1_in?: String[] | String;
player1_not_in?: String[] | String;
player1_lt?: String;
player1_lte?: String;
player1_gt?: String;
player1_gte?: String;
player1_contains?: String;
player1_not_contains?: String;
player1_starts_with?: String;
player1_not_starts_with?: String;
player1_ends_with?: String;
player1_not_ends_with?: String;
player2?: String;
player2_not?: String;
player2_in?: String[] | String;
player2_not_in?: String[] | String;
player2_lt?: String;
player2_lte?: String;
player2_gt?: String;
player2_gte?: String;
player2_contains?: String;
player2_not_contains?: String;
player2_starts_with?: String;
player2_not_starts_with?: String;
player2_ends_with?: String;
player2_not_ends_with?: String;
state?: String;
state_not?: String;
state_in?: String[] | String;
state_not_in?: String[] | String;
state_lt?: String;
state_lte?: String;
state_gt?: String;
state_gte?: String;
state_contains?: String;
state_not_contains?: String;
state_starts_with?: String;
state_not_starts_with?: String;
state_ends_with?: String;
state_not_ends_with?: String;
board?: String;
board_not?: String;
board_in?: String[] | String;
board_not_in?: String[] | String;
board_lt?: String;
board_lte?: String;
board_gt?: String;
board_gte?: String;
board_contains?: String;
board_not_contains?: String;
board_starts_with?: String;
board_not_starts_with?: String;
board_ends_with?: String;
board_not_ends_with?: String;
AND?: GameSessionWhereInput[] | GameSessionWhereInput;
OR?: GameSessionWhereInput[] | GameSessionWhereInput;
NOT?: GameSessionWhereInput[] | GameSessionWhereInput;
}
export interface GameSessionCreateInput {
player1: String;
player2: String;
state: String;
board: String;
}
export interface GameSessionUpdateInput {
player1?: String;
player2?: String;
state?: String;
board?: String;
}
export interface GameSessionUpdateManyMutationInput {
player1?: String;
player2?: String;
state?: String;
board?: String;
}
export interface GameSessionSubscriptionWhereInput {
mutation_in?: MutationType[] | MutationType;
updatedFields_contains?: String;
updatedFields_contains_every?: String[] | String;
updatedFields_contains_some?: String[] | String;
node?: GameSessionWhereInput;
AND?: GameSessionSubscriptionWhereInput[] | GameSessionSubscriptionWhereInput;
OR?: GameSessionSubscriptionWhereInput[] | GameSessionSubscriptionWhereInput;
NOT?: GameSessionSubscriptionWhereInput[] | GameSessionSubscriptionWhereInput;
}
export interface NodeNode {
id: ID_Output;
}
export interface GameSession {
id: ID_Output;
player1: String;
player2: String;
state: String;
board: String;
}
export interface GameSessionPromise extends Promise<GameSession>, Fragmentable {
id: () => Promise<ID_Output>;
player1: () => Promise<String>;
player2: () => Promise<String>;
state: () => Promise<String>;
board: () => Promise<String>;
}
export interface GameSessionSubscription
extends Promise<AsyncIterator<GameSession>>,
Fragmentable {
id: () => Promise<AsyncIterator<ID_Output>>;
player1: () => Promise<AsyncIterator<String>>;
player2: () => Promise<AsyncIterator<String>>;
state: () => Promise<AsyncIterator<String>>;
board: () => Promise<AsyncIterator<String>>;
}
export interface GameSessionConnection {
pageInfo: PageInfo;
edges: GameSessionEdge[];
}
export interface GameSessionConnectionPromise
extends Promise<GameSessionConnection>,
Fragmentable {
pageInfo: <T = PageInfoPromise>() => T;
edges: <T = FragmentableArray<GameSessionEdge>>() => T;
aggregate: <T = AggregateGameSessionPromise>() => T;
}
export interface GameSessionConnectionSubscription
extends Promise<AsyncIterator<GameSessionConnection>>,
Fragmentable {
pageInfo: <T = PageInfoSubscription>() => T;
edges: <T = Promise<AsyncIterator<GameSessionEdgeSubscription>>>() => T;
aggregate: <T = AggregateGameSessionSubscription>() => T;
}
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 GameSessionEdge {
node: GameSession;
cursor: String;
}
export interface GameSessionEdgePromise
extends Promise<GameSessionEdge>,
Fragmentable {
node: <T = GameSessionPromise>() => T;
cursor: () => Promise<String>;
}
export interface GameSessionEdgeSubscription
extends Promise<AsyncIterator<GameSessionEdge>>,
Fragmentable {
node: <T = GameSessionSubscription>() => T;
cursor: () => Promise<AsyncIterator<String>>;
}
export interface AggregateGameSession {
count: Int;
}
export interface AggregateGameSessionPromise
extends Promise<AggregateGameSession>,
Fragmentable {
count: () => Promise<Int>;
}
export interface AggregateGameSessionSubscription
extends Promise<AsyncIterator<AggregateGameSession>>,
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 GameSessionSubscriptionPayload {
mutation: MutationType;
node: GameSession;
updatedFields: String[];
previousValues: GameSessionPreviousValues;
}
export interface GameSessionSubscriptionPayloadPromise
extends Promise<GameSessionSubscriptionPayload>,
Fragmentable {
mutation: () => Promise<MutationType>;
node: <T = GameSessionPromise>() => T;
updatedFields: () => Promise<String[]>;
previousValues: <T = GameSessionPreviousValuesPromise>() => T;
}
export interface GameSessionSubscriptionPayloadSubscription
extends Promise<AsyncIterator<GameSessionSubscriptionPayload>>,
Fragmentable {
mutation: () => Promise<AsyncIterator<MutationType>>;
node: <T = GameSessionSubscription>() => T;
updatedFields: () => Promise<AsyncIterator<String[]>>;
previousValues: <T = GameSessionPreviousValuesSubscription>() => T;
}
export interface GameSessionPreviousValues {
id: ID_Output;
player1: String;
player2: String;
state: String;
board: String;
}
export interface GameSessionPreviousValuesPromise
extends Promise<GameSessionPreviousValues>,
Fragmentable {
id: () => Promise<ID_Output>;
player1: () => Promise<String>;
player2: () => Promise<String>;
state: () => Promise<String>;
board: () => Promise<String>;
}
export interface GameSessionPreviousValuesSubscription
extends Promise<AsyncIterator<GameSessionPreviousValues>>,
Fragmentable {
id: () => Promise<AsyncIterator<ID_Output>>;
player1: () => Promise<AsyncIterator<String>>;
player2: () => Promise<AsyncIterator<String>>;
state: () => Promise<AsyncIterator<String>>;
board: () => Promise<AsyncIterator<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 `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;
/*
The `Boolean` scalar type represents `true` or `false`.
*/
export type Boolean = boolean;
export type Long = string;
/**
* Model Metadata
*/
export const models: Model[] = [
{
name: "GameSession",
embedded: false
}
];
/**
* Type Defs
*/
export const prisma: Prisma;