2021-10-26 20:49:37 +00:00
|
|
|
import { gql } from '@apollo/client'
|
2021-12-16 20:02:17 +00:00
|
|
|
import { ITEM_FIELDS } from './items'
|
2021-10-26 20:49:37 +00:00
|
|
|
|
|
|
|
export const INVOICE = gql`
|
|
|
|
query Invoice($id: ID!) {
|
|
|
|
invoice(id: $id) {
|
|
|
|
id
|
|
|
|
bolt11
|
|
|
|
msatsReceived
|
|
|
|
cancelled
|
|
|
|
confirmedAt
|
|
|
|
expiresAt
|
|
|
|
}
|
|
|
|
}`
|
|
|
|
|
|
|
|
export const WITHDRAWL = gql`
|
|
|
|
query Withdrawl($id: ID!) {
|
|
|
|
withdrawl(id: $id) {
|
|
|
|
id
|
|
|
|
bolt11
|
|
|
|
satsPaid
|
|
|
|
satsFeePaying
|
|
|
|
satsFeePaid
|
|
|
|
status
|
|
|
|
}
|
|
|
|
}`
|
2021-10-28 19:59:53 +00:00
|
|
|
|
2021-12-15 16:50:11 +00:00
|
|
|
export const WALLET_HISTORY = gql`
|
2021-12-16 20:02:17 +00:00
|
|
|
${ITEM_FIELDS}
|
|
|
|
|
2021-12-16 17:27:12 +00:00
|
|
|
query WalletHistory($cursor: String, $inc: String) {
|
|
|
|
walletHistory(cursor: $cursor, inc: $inc) {
|
2021-12-15 16:50:11 +00:00
|
|
|
facts {
|
|
|
|
id
|
2021-12-16 17:27:12 +00:00
|
|
|
factId
|
2021-12-15 16:50:11 +00:00
|
|
|
type
|
|
|
|
createdAt
|
|
|
|
msats
|
|
|
|
msatsFee
|
|
|
|
status
|
|
|
|
type
|
|
|
|
description
|
2021-12-16 20:02:17 +00:00
|
|
|
item {
|
|
|
|
...ItemFields
|
|
|
|
text
|
|
|
|
}
|
2021-12-15 16:50:11 +00:00
|
|
|
}
|
|
|
|
cursor
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
2021-10-28 19:59:53 +00:00
|
|
|
export const CREATE_WITHDRAWL = gql`
|
|
|
|
mutation createWithdrawl($invoice: String!, $maxFee: Int!) {
|
|
|
|
createWithdrawl(invoice: $invoice, maxFee: $maxFee) {
|
|
|
|
id
|
|
|
|
}
|
|
|
|
}`
|