66 lines
1.2 KiB
JavaScript
Raw Normal View History

2021-10-26 15:49:37 -05:00
import { gql } from '@apollo/client'
2023-02-03 18:08:08 -06:00
import { ITEM_FULL_FIELDS } from './items'
2021-10-26 15:49:37 -05:00
export const INVOICE = gql`
query Invoice($id: ID!) {
invoice(id: $id) {
id
hash
2021-10-26 15:49:37 -05:00
bolt11
2022-11-15 14:51:55 -06:00
satsReceived
2021-10-26 15:49:37 -05:00
cancelled
confirmedAt
expiresAt
}
}`
export const WITHDRAWL = gql`
query Withdrawl($id: ID!) {
withdrawl(id: $id) {
id
bolt11
satsPaid
satsFeePaying
satsFeePaid
status
}
}`
2021-10-28 14:59:53 -05:00
2021-12-15 10:50:11 -06:00
export const WALLET_HISTORY = gql`
2023-02-03 18:08:08 -06:00
${ITEM_FULL_FIELDS}
2021-12-16 14:02:17 -06:00
2021-12-16 11:27:12 -06:00
query WalletHistory($cursor: String, $inc: String) {
walletHistory(cursor: $cursor, inc: $inc) {
2021-12-15 10:50:11 -06:00
facts {
id
2021-12-16 11:27:12 -06:00
factId
2021-12-15 10:50:11 -06:00
type
createdAt
2022-11-15 14:51:55 -06:00
sats
satsFee
2021-12-15 10:50:11 -06:00
status
type
description
2021-12-16 14:02:17 -06:00
item {
2023-02-03 18:08:08 -06:00
...ItemFullFields
2021-12-16 14:02:17 -06:00
}
2021-12-15 10:50:11 -06:00
}
cursor
}
}
`
2021-10-28 14:59:53 -05:00
export const CREATE_WITHDRAWL = gql`
mutation createWithdrawl($invoice: String!, $maxFee: Int!) {
createWithdrawl(invoice: $invoice, maxFee: $maxFee) {
id
}
}`
2022-01-23 11:21:55 -06:00
export const SEND_TO_LNADDR = gql`
mutation sendToLnAddr($addr: String!, $amount: Int!, $maxFee: Int!) {
sendToLnAddr(addr: $addr, amount: $amount, maxFee: $maxFee) {
id
}
}`