Files
landscape-template/api/functions/graphql/schema.graphql

395 lines
7.0 KiB
GraphQL

### This file was generated by Nexus Schema
### Do not make changes to this file directly
type Author {
avatar: String!
id: Int!
join_date: Date!
lightning_address: String
name: String!
}
type Award {
id: Int!
image: String!
project: Project!
title: String!
url: String!
}
interface BaseUser {
avatar: String!
bio: String
email: String
github: String
id: Int!
jobTitle: String
join_date: Date!
lightning_address: String
linkedin: String
location: String
name: String!
role: String
roles: [MakerRole!]!
similar_makers: [User!]!
skills: [MakerSkill!]!
stories: [Story!]!
tournaments: [Tournament!]!
twitter: String
website: String
}
type Bounty implements PostBase {
applicants_count: Int!
applications: [BountyApplication!]!
author: Author!
body: String!
cover_image: String
createdAt: Date!
deadline: String!
excerpt: String!
id: Int!
is_published: Boolean
reward_amount: Int!
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
type BountyApplication {
author: Author!
date: String!
id: Int!
workplan: String!
}
type Category {
apps_count: Int!
cover_image: String
icon: String
id: Int!
project: [Project!]!
title: String!
votes_sum: Int!
}
"""Date custom scalar type"""
scalar Date
type Donation {
amount: Int!
by: User
createdAt: Date!
id: Int!
paid: Boolean!
payment_hash: String!
payment_request: String!
}
type DonationsStats {
applications: String!
donations: String!
prizes: String!
touranments: String!
}
type GenericMakerRole {
icon: String!
id: Int!
title: String!
}
type Hackathon {
cover_image: String!
description: String!
end_date: Date!
id: Int!
location: String!
start_date: Date!
tags: [Tag!]!
title: String!
website: String!
}
input ImageInput {
id: String
name: String
url: String!
}
type LnurlDetails {
commentAllowed: Int
maxSendable: Int
metadata: String
minSendable: Int
}
type MakerRole {
icon: String!
id: Int!
level: RoleLevelEnum!
title: String!
}
input MakerRoleInput {
id: Int!
level: RoleLevelEnum!
}
type MakerSkill {
id: Int!
title: String!
}
input MakerSkillInput {
id: Int!
}
type Mutation {
confirmDonation(payment_request: String!, preimage: String!): Donation!
confirmVote(payment_request: String!, preimage: String!): Vote!
createStory(data: StoryInputType): Story
deleteStory(id: Int!): Story
donate(amount_in_sat: Int!): Donation!
updateProfileDetails(data: ProfileDetailsInput): MyProfile
updateProfileRoles(data: ProfileRolesInput): MyProfile
updateUserPreferences(userKeys: [UserKeyInputType!]): MyProfile!
vote(amount_in_sat: Int!, item_id: Int!, item_type: VOTE_ITEM_TYPE!): Vote!
}
type MyProfile implements BaseUser {
avatar: String!
bio: String
email: String
github: String
id: Int!
jobTitle: String
join_date: Date!
lightning_address: String
linkedin: String
location: String
name: String!
nostr_prv_key: String
nostr_pub_key: String
role: String
roles: [MakerRole!]!
similar_makers: [User!]!
skills: [MakerSkill!]!
stories: [Story!]!
tournaments: [Tournament!]!
twitter: String
walletsKeys: [WalletKey!]!
website: String
}
enum POST_TYPE {
Bounty
Question
Story
}
union Post = Bounty | Question | Story
interface PostBase {
body: String!
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
title: String!
updatedAt: Date!
votes_count: Int!
}
type PostComment {
author: Author!
body: String!
created_at: Date!
id: Int!
parentId: Int
votes_count: Int!
}
input ProfileDetailsInput {
avatar: ImageInput
bio: String
email: String
github: String
jobTitle: String
lightning_address: String
linkedin: String
location: String
name: String
twitter: String
website: String
}
input ProfileRolesInput {
roles: [MakerRoleInput!]!
skills: [MakerSkillInput!]!
}
type Project {
awards: [Award!]!
category: Category!
cover_image: String!
description: String!
id: Int!
lightning_address: String
lnurl_callback_url: String
recruit_roles: [MakerRole!]!
screenshots: [String!]!
tags: [Tag!]!
thumbnail_image: String!
title: String!
votes_count: Int!
website: String!
}
type Query {
allCategories: [Category!]!
allProjects(skip: Int = 0, take: Int = 50): [Project!]!
getAllHackathons(sortBy: String, tag: Int): [Hackathon!]!
getAllMakersRoles: [GenericMakerRole!]!
getAllMakersSkills: [MakerSkill!]!
getCategory(id: Int!): Category!
getDonationsStats: DonationsStats!
getFeed(skip: Int = 0, sortBy: String, tag: Int = 0, take: Int = 10): [Post!]!
getLnurlDetailsForProject(project_id: Int!): LnurlDetails!
getMyDrafts(type: POST_TYPE!): [Post!]!
getPostById(id: Int!, type: POST_TYPE!): Post!
getProject(id: Int!): Project!
getTrendingPosts: [Post!]!
hottestProjects(skip: Int = 0, take: Int = 50): [Project!]!
me: MyProfile
newProjects(skip: Int = 0, take: Int = 50): [Project!]!
officialTags: [Tag!]!
popularTags: [Tag!]!
profile(id: Int!): User
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!]!
}
type Question implements PostBase {
author: Author!
body: String!
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
enum RoleLevelEnum {
Advanced
Beginner
Hobbyist
Intermediate
Pro
}
type Story implements PostBase {
author: Author!
body: String!
comments: [PostComment!]!
comments_count: Int!
cover_image: String
createdAt: Date!
excerpt: String!
id: Int!
is_published: Boolean
tags: [Tag!]!
title: String!
type: String!
updatedAt: Date!
votes_count: Int!
}
input StoryInputType {
body: String!
cover_image: ImageInput
id: Int
is_published: Boolean
tags: [String!]!
title: String!
}
type Tag {
description: String
icon: String
id: Int!
isOfficial: Boolean
title: String!
}
type Tournament {
cover_image: String!
description: String!
end_date: Date!
id: Int!
start_date: Date!
tags: [Tag!]!
thumbnail_image: String!
title: String!
website: String!
}
type User implements BaseUser {
avatar: String!
bio: String
email: String
github: String
id: Int!
jobTitle: String
join_date: Date!
lightning_address: String
linkedin: String
location: String
name: String!
role: String
roles: [MakerRole!]!
similar_makers: [User!]!
skills: [MakerSkill!]!
stories: [Story!]!
tournaments: [Tournament!]!
twitter: String
website: String
}
input UserKeyInputType {
key: String!
name: String!
}
enum VOTE_ITEM_TYPE {
Bounty
PostComment
Project
Question
Story
User
}
type Vote {
amount_in_sat: Int!
id: Int!
item_id: Int!
item_type: VOTE_ITEM_TYPE!
paid: Boolean!
payment_hash: String!
payment_request: String!
}
type WalletKey {
is_current: Boolean!
key: String!
name: String!
}