mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-06 16:04:23 +01:00
fix merge confilicts with tournaments
This commit is contained in:
@@ -24,7 +24,7 @@ declare global {
|
||||
|
||||
|
||||
declare global {
|
||||
interface NexusGen extends NexusGenTypes { }
|
||||
interface NexusGen extends NexusGenTypes {}
|
||||
}
|
||||
|
||||
export interface NexusGenInputs {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
### This file was generated by Nexus Schema
|
||||
### Do not make changes to this file directly
|
||||
|
||||
|
||||
type Author {
|
||||
avatar: String!
|
||||
id: Int!
|
||||
@@ -75,9 +76,7 @@ type Category {
|
||||
votes_sum: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
Date custom scalar type
|
||||
"""
|
||||
"""Date custom scalar type"""
|
||||
scalar Date
|
||||
|
||||
type Donation {
|
||||
@@ -264,11 +263,7 @@ type Query {
|
||||
officialTags: [Tag!]!
|
||||
popularTags: [Tag!]!
|
||||
profile(id: Int!): User
|
||||
projectsByCategory(
|
||||
category_id: Int!
|
||||
skip: Int = 0
|
||||
take: Int = 10
|
||||
): [Project!]!
|
||||
projectsByCategory(category_id: Int!, skip: Int = 0, take: Int = 10): [Project!]!
|
||||
searchProjects(search: String!, skip: Int = 0, take: Int = 50): [Project!]!
|
||||
similarMakers(id: Int!): [User!]!
|
||||
}
|
||||
@@ -426,4 +421,4 @@ type Vote {
|
||||
type WalletKey {
|
||||
key: String!
|
||||
name: String!
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
const {
|
||||
intArg,
|
||||
objectType,
|
||||
stringArg,
|
||||
extendType,
|
||||
nonNull,
|
||||
} = require('nexus');
|
||||
const { prisma } = require('../../../prisma');
|
||||
|
||||
|
||||
|
||||
const Tournament = objectType({
|
||||
name: 'Tournament',
|
||||
definition(t) {
|
||||
t.nonNull.int('id');
|
||||
t.nonNull.string('title');
|
||||
t.nonNull.string('description');
|
||||
t.nonNull.string('thumbnail_image');
|
||||
t.nonNull.string('cover_image');
|
||||
t.nonNull.date('start_date');
|
||||
t.nonNull.date('end_date');
|
||||
t.nonNull.string('website');
|
||||
t.nonNull.list.nonNull.field('tags', {
|
||||
type: "Tag",
|
||||
resolve: (parent) => {
|
||||
// return prisma.hackathon.findUnique({ where: { id: parent.id } }).tags();
|
||||
return [];
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
const getAllTournaments = extendType({
|
||||
type: "Query",
|
||||
definition(t) {
|
||||
t.nonNull.list.nonNull.field('getAllTournaments', {
|
||||
type: Tournament,
|
||||
args: {
|
||||
sortBy: stringArg(),
|
||||
tag: intArg(),
|
||||
},
|
||||
resolve(_, args) {
|
||||
const { sortBy, tag } = args;
|
||||
return [];
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
// Types
|
||||
Tournament,
|
||||
// Queries
|
||||
getAllTournaments,
|
||||
}
|
||||
@@ -3,7 +3,7 @@ const { prisma } = require('../../../prisma');
|
||||
const { objectType, extendType, intArg, nonNull, inputObjectType, interfaceType, list, enumType } = require("nexus");
|
||||
const { getUserByPubKey } = require("../../../auth/utils/helperFuncs");
|
||||
const { removeNulls } = require("./helpers");
|
||||
const { Tournament } = require('./tournaments');
|
||||
const { Tournament } = require('./tournament');
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user