fix: handle different prisma clients types

This commit is contained in:
MTG2000
2022-09-25 12:07:30 +03:00
parent 4b4036fc57
commit 3fd0b27a84
4 changed files with 38 additions and 29 deletions

View File

@@ -131,6 +131,7 @@ export interface NexusGenInputs {
export interface NexusGenEnums {
POST_TYPE: "Bounty" | "Question" | "Story"
ProjectLaunchStatusEnum: "Launched" | "WIP"
ProjectPermissionEnum: "DeleteProject" | "UpdateAdmins" | "UpdateInfo" | "UpdateMembers"
RoleLevelEnum: 3 | 0 | 1 | 2 | 4
TEAM_MEMBER_ROLE: "Admin" | "Maker" | "Owner"
TournamentEventTypeEnum: 2 | 3 | 0 | 1
@@ -283,7 +284,6 @@ export interface NexusGenObjects {
tagline: string; // String!
telegram?: string | null; // String
title: string; // String!
tournaments?: NexusGenRootTypes['TournamentProject'][] | null; // [TournamentProject!]
twitter?: string | null; // String
votes_count: number; // Int!
website: string; // String!
@@ -361,10 +361,6 @@ export interface NexusGenObjects {
amount: string; // String!
title: string; // String!
}
TournamentProject: { // root type
project: NexusGenRootTypes['Project']; // Project!
tournament: NexusGenRootTypes['Tournament']; // Tournament!
}
TournamentProjectsResponse: { // root type
hasNext?: boolean | null; // Boolean
hasPrev?: boolean | null; // Boolean
@@ -587,6 +583,7 @@ export interface NexusGenFieldTypes {
lightning_address: string | null; // String
lnurl_callback_url: string | null; // String
members: NexusGenRootTypes['ProjectMember'][]; // [ProjectMember!]!
permissions: NexusGenEnums['ProjectPermissionEnum'][]; // [ProjectPermissionEnum!]!
recruit_roles: NexusGenRootTypes['MakerRole'][]; // [MakerRole!]!
screenshots: string[]; // [String!]!
slack: string | null; // String
@@ -595,7 +592,7 @@ export interface NexusGenFieldTypes {
telegram: string | null; // String
thumbnail_image: string; // String!
title: string; // String!
tournaments: NexusGenRootTypes['TournamentProject'][] | null; // [TournamentProject!]
tournaments: NexusGenRootTypes['Tournament'][]; // [Tournament!]!
twitter: string | null; // String
votes_count: number; // Int!
website: string; // String!
@@ -726,10 +723,6 @@ export interface NexusGenFieldTypes {
image: string; // String!
title: string; // String!
}
TournamentProject: { // field return type
project: NexusGenRootTypes['Project']; // Project!
tournament: NexusGenRootTypes['Tournament']; // Tournament!
}
TournamentProjectsResponse: { // field return type
hasNext: boolean | null; // Boolean
hasPrev: boolean | null; // Boolean
@@ -978,6 +971,7 @@ export interface NexusGenFieldTypeNames {
lightning_address: 'String'
lnurl_callback_url: 'String'
members: 'ProjectMember'
permissions: 'ProjectPermissionEnum'
recruit_roles: 'MakerRole'
screenshots: 'String'
slack: 'String'
@@ -986,7 +980,7 @@ export interface NexusGenFieldTypeNames {
telegram: 'String'
thumbnail_image: 'String'
title: 'String'
tournaments: 'TournamentProject'
tournaments: 'Tournament'
twitter: 'String'
votes_count: 'Int'
website: 'String'
@@ -1117,10 +1111,6 @@ export interface NexusGenFieldTypeNames {
image: 'String'
title: 'String'
}
TournamentProject: { // field return type name
project: 'Project'
tournament: 'Tournament'
}
TournamentProjectsResponse: { // field return type name
hasNext: 'Boolean'
hasPrev: 'Boolean'

View File

@@ -294,6 +294,7 @@ type Project {
lightning_address: String
lnurl_callback_url: String
members: [ProjectMember!]!
permissions: [ProjectPermissionEnum!]!
recruit_roles: [MakerRole!]!
screenshots: [String!]!
slack: String
@@ -302,7 +303,7 @@ type Project {
telegram: String
thumbnail_image: String!
title: String!
tournaments: [TournamentProject!]
tournaments: [Tournament!]!
twitter: String
votes_count: Int!
website: String!
@@ -318,6 +319,13 @@ type ProjectMember {
user: User!
}
enum ProjectPermissionEnum {
DeleteProject
UpdateAdmins
UpdateInfo
UpdateMembers
}
type Query {
allCategories: [Category!]!
allProjects(skip: Int = 0, take: Int = 50): [Project!]!
@@ -496,11 +504,6 @@ type TournamentPrize {
title: String!
}
type TournamentProject {
project: Project!
tournament: Tournament!
}
type TournamentProjectsResponse {
hasNext: Boolean
hasPrev: Boolean