mirror of
https://github.com/aljazceru/landscape-template.git
synced 2025-12-27 19:24:18 +01:00
51 lines
1.1 KiB
JavaScript
51 lines
1.1 KiB
JavaScript
const { gql } = require("apollo-server-lambda");
|
|
|
|
module.exports = gql`
|
|
type Project {
|
|
id: Int!
|
|
cover_image: String!
|
|
thumbnail_image: String!
|
|
title: String!
|
|
website: String!
|
|
lightning_address: String!
|
|
votes_count: Int!
|
|
category: Category!
|
|
}
|
|
|
|
type Category {
|
|
id: Int!
|
|
title: String!
|
|
project: [Project]
|
|
}
|
|
|
|
type Vote {
|
|
id: Int!
|
|
project: Project!
|
|
amount_in_sat: Int!
|
|
payment_request: String!
|
|
payment_hash: String!
|
|
paid: Boolean!
|
|
}
|
|
|
|
type LnurlDetails {
|
|
minSendable: Int
|
|
maxSendable: Int
|
|
metadata: String
|
|
commentAllowed: Int
|
|
}
|
|
|
|
type Query {
|
|
allProjects(skip: Int, take: Int): [Project]!
|
|
newProjects(skip: Int, take: Int): [Project]!
|
|
projectsByCategory(category_id: Int!, skip: Int, take: Int): [Project]!
|
|
getProject(id: Int!): Project!
|
|
allCategories: [Category]!
|
|
getCategory(id: Int!): Category!
|
|
getLnurlDetailsForProject(project_id: Int!): LnurlDetails!
|
|
}
|
|
type Mutation {
|
|
vote(project_id: Int!, amount_in_sat: Int!): Vote!
|
|
confirmVote(payment_request: String!, preimage: String!): Vote!
|
|
}
|
|
`;
|