From 822fd8048703c1901d328d85d3e4569f81e1cb64 Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Thu, 14 Jul 2022 09:41:28 +0300 Subject: [PATCH] udpate graphql schema --- api/functions/graphql/schema.graphql | 269 --------------------------- 1 file changed, 269 deletions(-) delete mode 100644 api/functions/graphql/schema.graphql diff --git a/api/functions/graphql/schema.graphql b/api/functions/graphql/schema.graphql deleted file mode 100644 index b334d3f..0000000 --- a/api/functions/graphql/schema.graphql +++ /dev/null @@ -1,269 +0,0 @@ -### This file was generated by Nexus Schema -### Do not make changes to this file directly - - -type Author { - avatar: String! - id: Int! - join_date: Date! - name: String! -} - -type Award { - id: Int! - image: String! - project: Project! - title: String! - url: 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 Hackathon { - cover_image: String! - description: String! - end_date: Date! - id: Int! - location: String! - start_date: Date! - tags: [Tag!]! - title: String! - website: String! -} - -type LnurlDetails { - commentAllowed: Int - maxSendable: Int - metadata: String - minSendable: 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! - updateProfile(data: UpdateProfileInput): User - vote(amount_in_sat: Int!, item_id: Int!, item_type: VOTE_ITEM_TYPE!): Vote! -} - -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! - createdAt: Date! - id: Int! - parentId: Int - votes_count: Int! -} - -type Project { - awards: [Award!]! - category: Category! - cover_image: String! - description: String! - id: Int! - lightning_address: String - lnurl_callback_url: String - 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!]! - 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: User - 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!]! -} - -type Question implements PostBase { - answers_count: Int! - author: Author! - body: String! - comments: [PostComment!]! - createdAt: Date! - excerpt: String! - id: Int! - is_published: Boolean - tags: [Tag!]! - title: String! - type: String! - updatedAt: Date! - votes_count: Int! -} - -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: String - id: Int - is_published: Boolean - tags: [String!]! - title: String! -} - -type Tag { - description: String - icon: String - id: Int! - isOfficial: Boolean - title: String! -} - -input UpdateProfileInput { - avatar: String - bio: String - email: String - github: String - jobTitle: String - lightning_address: String - linkedin: String - location: String - name: String - twitter: String - website: String -} - -type User { - 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 - twitter: String - website: 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! -} \ No newline at end of file