diff --git a/api/functions/graphql/nexus-typegen.ts b/api/functions/graphql/nexus-typegen.ts index 4161f06..d5efd5f 100644 --- a/api/functions/graphql/nexus-typegen.ts +++ b/api/functions/graphql/nexus-typegen.ts @@ -203,6 +203,7 @@ export interface NexusGenObjects { lnurl_callback_url?: string | null; // String screenshots: string[]; // [String!]! thumbnail_image: string; // String! + title: string; // String! votes_count: number; // Int! website: string; // String! } diff --git a/api/functions/graphql/types/tournament.js b/api/functions/graphql/types/tournament.js index a69484f..3617f44 100644 --- a/api/functions/graphql/types/tournament.js +++ b/api/functions/graphql/types/tournament.js @@ -126,7 +126,9 @@ const getMakersInTournament = extendType({ name: { contains: args.search, mode: 'insensitive' - }, + } + }, + { jobTitle: { contains: args.search, mode: 'insensitive' @@ -135,6 +137,7 @@ const getMakersInTournament = extendType({ ] }) + if (args.roleId) filters.push({ roles: { some: { @@ -143,6 +146,8 @@ const getMakersInTournament = extendType({ } }) + console.log(filters[0]); + return prisma.user.findMany({ ...(filters.length > 0 && {