1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-30 05:41:41 +02:00
market/src/@context/Pool/_queries.ts
mihaisc 677563d7c2
fix pool tab (#1121)
* query update

* fixes
2022-02-17 16:00:08 +00:00

47 lines
868 B
TypeScript

import { gql } from 'urql'
export const poolDataQuery = gql`
query PoolData(
$pool: ID!
$poolAsString: String!
$owner: String!
$user: String
) {
poolData: pool(id: $pool) {
id
totalShares
liquidityProviderFee
opcFee
marketSwapFee
spotPrice
baseToken {
address
symbol
}
baseTokenWeight
baseTokenLiquidity
datatoken {
address
symbol
}
datatokenWeight
datatokenLiquidity
shares(where: { user: $owner }) {
shares
}
}
poolDataUser: pool(id: $pool) {
shares(where: { user: $user }) {
shares
}
}
poolSnapshots(first: 1000, where: { pool: $poolAsString }, orderBy: date) {
date
spotPrice
baseTokenLiquidity
datatokenLiquidity
swapVolume
}
}
`