Commit 6a86445c authored by Giantzoc's avatar Giantzoc
Browse files

Adding prisma server

parent c2df0fa4
type Link{
id: ID! @unique
url: String! @unique
visited: Boolean! @default(value: "false")
saved: Boolean! @default(value: "false")
status: String
error: String
}
\ No newline at end of file
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.19
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: postgres
host: postgres
port: 5432
user: prisma
password: prisma
migrations: true
rawAccess: true
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
volumes:
- postgres:/var/lib/postgresql/data
volumes:
postgres:
// Code generated by Prisma (prisma@1.19.1). 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, GraphQLSchema } from "graphql";
import { IResolvers } from "graphql-tools/dist/Interfaces";
import { makePrismaClientClass, BaseClientOptions } from "prisma-client-lib";
import { typeDefs } from "./prisma-schema";
type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> &
U[keyof U];
export interface Exists {
link: (where?: LinkWhereInput) => 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
*/
link: (where: LinkWhereUniqueInput) => Link;
links: (
args?: {
where?: LinkWhereInput;
orderBy?: LinkOrderByInput;
skip?: Int;
after?: String;
before?: String;
first?: Int;
last?: Int;
}
) => FragmentableArray<LinkNode>;
linksConnection: (
args?: {
where?: LinkWhereInput;
orderBy?: LinkOrderByInput;
skip?: Int;
after?: String;
before?: String;
first?: Int;
last?: Int;
}
) => LinkConnection;
node: (args: { id: ID_Output }) => Node;
/**
* Mutations
*/
createLink: (data: LinkCreateInput) => Link;
updateLink: (
args: { data: LinkUpdateInput; where: LinkWhereUniqueInput }
) => Link;
updateManyLinks: (
args: { data: LinkUpdateInput; where?: LinkWhereInput }
) => BatchPayload;
upsertLink: (
args: {
where: LinkWhereUniqueInput;
create: LinkCreateInput;
update: LinkUpdateInput;
}
) => Link;
deleteLink: (where: LinkWhereUniqueInput) => Link;
deleteManyLinks: (where?: LinkWhereInput) => BatchPayload;
/**
* Subscriptions
*/
$subscribe: Subscription;
}
export interface Subscription {
link: (
where?: LinkSubscriptionWhereInput
) => LinkSubscriptionPayloadSubscription;
}
export interface ClientConstructor<T> {
new (options?: BaseClientOptions): T;
}
/**
* Types
*/
export type LinkOrderByInput =
| "id_ASC"
| "id_DESC"
| "url_ASC"
| "url_DESC"
| "body_ASC"
| "body_DESC"
| "visited_ASC"
| "visited_DESC"
| "saved_ASC"
| "saved_DESC"
| "status_ASC"
| "status_DESC"
| "error_ASC"
| "error_DESC"
| "createdAt_ASC"
| "createdAt_DESC"
| "updatedAt_ASC"
| "updatedAt_DESC";
export type MutationType = "CREATED" | "UPDATED" | "DELETED";
export interface LinkCreateInput {
url: String;
body?: String;
visited?: Boolean;
saved?: Boolean;
status?: String;
error?: String;
}
export interface LinkWhereInput {
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;
url?: String;
url_not?: String;
url_in?: String[] | String;
url_not_in?: String[] | String;
url_lt?: String;
url_lte?: String;
url_gt?: String;
url_gte?: String;
url_contains?: String;
url_not_contains?: String;
url_starts_with?: String;
url_not_starts_with?: String;
url_ends_with?: String;
url_not_ends_with?: String;
body?: String;
body_not?: String;
body_in?: String[] | String;
body_not_in?: String[] | String;
body_lt?: String;
body_lte?: String;
body_gt?: String;
body_gte?: String;
body_contains?: String;
body_not_contains?: String;
body_starts_with?: String;
body_not_starts_with?: String;
body_ends_with?: String;
body_not_ends_with?: String;
visited?: Boolean;
visited_not?: Boolean;
saved?: Boolean;
saved_not?: Boolean;
status?: String;
status_not?: String;
status_in?: String[] | String;
status_not_in?: String[] | String;
status_lt?: String;
status_lte?: String;
status_gt?: String;
status_gte?: String;
status_contains?: String;
status_not_contains?: String;
status_starts_with?: String;
status_not_starts_with?: String;
status_ends_with?: String;
status_not_ends_with?: String;
error?: String;
error_not?: String;
error_in?: String[] | String;
error_not_in?: String[] | String;
error_lt?: String;
error_lte?: String;
error_gt?: String;
error_gte?: String;
error_contains?: String;
error_not_contains?: String;
error_starts_with?: String;
error_not_starts_with?: String;
error_ends_with?: String;
error_not_ends_with?: String;
AND?: LinkWhereInput[] | LinkWhereInput;
OR?: LinkWhereInput[] | LinkWhereInput;
NOT?: LinkWhereInput[] | LinkWhereInput;
}
export interface LinkUpdateInput {
url?: String;
body?: String;
visited?: Boolean;
saved?: Boolean;
status?: String;
error?: String;
}
export interface LinkSubscriptionWhereInput {
mutation_in?: MutationType[] | MutationType;
updatedFields_contains?: String;
updatedFields_contains_every?: String[] | String;
updatedFields_contains_some?: String[] | String;
node?: LinkWhereInput;
AND?: LinkSubscriptionWhereInput[] | LinkSubscriptionWhereInput;
OR?: LinkSubscriptionWhereInput[] | LinkSubscriptionWhereInput;
NOT?: LinkSubscriptionWhereInput[] | LinkSubscriptionWhereInput;
}
export type LinkWhereUniqueInput = AtLeastOne<{
id: ID_Input;
url?: String;
}>;
export interface NodeNode {
id: ID_Output;
}
export interface LinkEdgeNode {
cursor: String;
}
export interface LinkEdge extends Promise<LinkEdgeNode>, Fragmentable {
node: <T = Link>() => T;
cursor: () => Promise<String>;
}
export interface LinkEdgeSubscription
extends Promise<AsyncIterator<LinkEdgeNode>>,
Fragmentable {
node: <T = LinkSubscription>() => T;
cursor: () => Promise<AsyncIterator<String>>;
}
export interface BatchPayloadNode {
count: Long;
}
export interface BatchPayload extends Promise<BatchPayloadNode>, Fragmentable {
count: () => Promise<Long>;
}
export interface BatchPayloadSubscription
extends Promise<AsyncIterator<BatchPayloadNode>>,
Fragmentable {
count: () => Promise<AsyncIterator<Long>>;
}
export interface LinkPreviousValuesNode {
id: ID_Output;
url: String;
body?: String;
visited: Boolean;
saved: Boolean;
status?: String;
error?: String;
}
export interface LinkPreviousValues
extends Promise<LinkPreviousValuesNode>,
Fragmentable {
id: () => Promise<ID_Output>;
url: () => Promise<String>;
body: () => Promise<String>;
visited: () => Promise<Boolean>;
saved: () => Promise<Boolean>;
status: () => Promise<String>;
error: () => Promise<String>;
}
export interface LinkPreviousValuesSubscription
extends Promise<AsyncIterator<LinkPreviousValuesNode>>,
Fragmentable {
id: () => Promise<AsyncIterator<ID_Output>>;
url: () => Promise<AsyncIterator<String>>;
body: () => Promise<AsyncIterator<String>>;
visited: () => Promise<AsyncIterator<Boolean>>;
saved: () => Promise<AsyncIterator<Boolean>>;
status: () => Promise<AsyncIterator<String>>;
error: () => Promise<AsyncIterator<String>>;
}
export interface PageInfoNode {
hasNextPage: Boolean;
hasPreviousPage: Boolean;
startCursor?: String;
endCursor?: String;
}
export interface PageInfo extends Promise<PageInfoNode>, Fragmentable {
hasNextPage: () => Promise<Boolean>;
hasPreviousPage: () => Promise<Boolean>;
startCursor: () => Promise<String>;
endCursor: () => Promise<String>;
}
export interface PageInfoSubscription
extends Promise<AsyncIterator<PageInfoNode>>,
Fragmentable {
hasNextPage: () => Promise<AsyncIterator<Boolean>>;
hasPreviousPage: () => Promise<AsyncIterator<Boolean>>;
startCursor: () => Promise<AsyncIterator<String>>;
endCursor: () => Promise<AsyncIterator<String>>;
}
export interface LinkSubscriptionPayloadNode {
mutation: MutationType;
updatedFields?: String[];
}
export interface LinkSubscriptionPayload
extends Promise<LinkSubscriptionPayloadNode>,
Fragmentable {
mutation: () => Promise<MutationType>;
node: <T = Link>() => T;
updatedFields: () => Promise<String[]>;
previousValues: <T = LinkPreviousValues>() => T;
}
export interface LinkSubscriptionPayloadSubscription
extends Promise<AsyncIterator<LinkSubscriptionPayloadNode>>,
Fragmentable {
mutation: () => Promise<AsyncIterator<MutationType>>;
node: <T = LinkSubscription>() => T;
updatedFields: () => Promise<AsyncIterator<String[]>>;
previousValues: <T = LinkPreviousValuesSubscription>() => T;
}
export interface LinkNode {
id: ID_Output;
url: String;
body?: String;
visited: Boolean;
saved: Boolean;
status?: String;
error?: String;
}
export interface Link extends Promise<LinkNode>, Fragmentable {
id: () => Promise<ID_Output>;
url: () => Promise<String>;
body: () => Promise<String>;
visited: () => Promise<Boolean>;
saved: () => Promise<Boolean>;
status: () => Promise<String>;
error: () => Promise<String>;
}
export interface LinkSubscription
extends Promise<AsyncIterator<LinkNode>>,
Fragmentable {
id: () => Promise<AsyncIterator<ID_Output>>;
url: () => Promise<AsyncIterator<String>>;
body: () => Promise<AsyncIterator<String>>;
visited: () => Promise<AsyncIterator<Boolean>>;
saved: () => Promise<AsyncIterator<Boolean>>;
status: () => Promise<AsyncIterator<String>>;
error: () => Promise<AsyncIterator<String>>;
}
export interface LinkConnectionNode {}
export interface LinkConnection
extends Promise<LinkConnectionNode>,
Fragmentable {
pageInfo: <T = PageInfo>() => T;
edges: <T = FragmentableArray<LinkEdgeNode>>() => T;
aggregate: <T = AggregateLink>() => T;
}
export interface LinkConnectionSubscription
extends Promise<AsyncIterator<LinkConnectionNode>>,
Fragmentable {
pageInfo: <T = PageInfoSubscription>() => T;
edges: <T = Promise<AsyncIterator<LinkEdgeSubscription>>>() => T;
aggregate: <T = AggregateLinkSubscription>() => T;
}
export interface AggregateLinkNode {
count: Int;
}
export interface AggregateLink
extends Promise<AggregateLinkNode>,
Fragmentable {
count: () => Promise<Int>;
}
export interface AggregateLinkSubscription
extends Promise<AsyncIterator<AggregateLinkNode>>,
Fragmentable {
count: () => Promise<AsyncIterator<Int>>;
}
/*
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;
export type Long = 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 `Boolean` scalar type represents `true` or `false`.
*/
export type Boolean = boolean;
/*
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;
/**
* Type Defs
*/
export const prisma: Prisma;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var prisma_lib_1 = require("prisma-client-lib");
var typeDefs = require("./prisma-schema").typeDefs;
exports.Prisma = prisma_lib_1.makePrismaClientClass({
typeDefs,
endpoint: `http://localhost:4466`
});
exports.prisma = new exports.Prisma();
module.exports = {
typeDefs: /* GraphQL */ `type AggregateLink {
count: Int!
}
type BatchPayload {
count: Long!
}
type Link {
id: ID!
url: String!
body: String
visited: Boolean!
saved: Boolean!
status: String
error: String
}
type LinkConnection {
pageInfo: PageInfo!
edges: [LinkEdge]!
aggregate: AggregateLink!
}
input LinkCreateInput {
url: String!
body: String
visited: Boolean
saved: Boolean
status: String
error: String
}
type LinkEdge {
node: Link!
cursor: String!
}
enum LinkOrderByInput {
id_ASC
id_DESC
url_ASC
url_DESC
body_ASC
body_DESC
visited_ASC
visited_DESC
saved_ASC
saved_DESC
status_ASC
status_DESC
error_ASC
error_DESC
createdAt_ASC
createdAt_DESC
updatedAt_ASC
updatedAt_DESC
}
type LinkPreviousValues {
id: ID!
url: String!
body: String
visited: Boolean!
saved: Boolean!
status: String
error: String
}
type LinkSubscriptionPayload {
mutation: MutationType!
node: Link
updatedFields: [String!]
previousValues: LinkPreviousValues
}
input LinkSubscriptionWhereInput {
mutation_in: [MutationType!]
updatedFields_contains: String
updatedFields_contains_every: [String!]
updatedFields_contains_some: [String!]
node: LinkWhereInput
AND: [LinkSubscriptionWhereInput!]
OR: [LinkSubscriptionWhereInput!]
NOT: [LinkSubscriptionWhereInput!]
}
input LinkUpdateInput {
url: String
body: String
visited: Boolean
saved: Boolean
status: String
error: String
}
input LinkWhereInput {
id: ID
id_not: ID
id_in: [ID!]
id_not_in: [ID!]
id_lt: ID