mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
isolate apollo stuff into npm script, more generic folder name output
This commit is contained in:
parent
de87e16906
commit
1726fe1d0d
2
.gitignore
vendored
2
.gitignore
vendored
@ -10,7 +10,7 @@ coverage
|
|||||||
.vercel
|
.vercel
|
||||||
repo-metadata.json
|
repo-metadata.json
|
||||||
networks-metadata.json
|
networks-metadata.json
|
||||||
src/@types/apollo
|
src/@types/subgraph
|
||||||
graphql.schema.json
|
graphql.schema.json
|
||||||
src/@types/graph.types.ts
|
src/@types/graph.types.ts
|
||||||
tsconfig.tsbuildinfo
|
tsconfig.tsbuildinfo
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
client: {
|
|
||||||
service: {
|
|
||||||
name: 'ocean',
|
|
||||||
url: 'https://subgraphv4.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph',
|
|
||||||
// optional disable SSL validation check
|
|
||||||
skipSSLValidation: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -10,13 +10,12 @@
|
|||||||
"serve": "serve -s public/",
|
"serve": "serve -s public/",
|
||||||
"pregenerate": "bash scripts/pregenerate.sh",
|
"pregenerate": "bash scripts/pregenerate.sh",
|
||||||
"test": "npm run pregenerate && npm run lint && npm run type-check",
|
"test": "npm run pregenerate && npm run lint && npm run type-check",
|
||||||
"test:graphql": "npm run codegen:graphql && npm run lint",
|
|
||||||
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
|
"lint": "eslint --ignore-path .gitignore --ext .js --ext .ts --ext .tsx .",
|
||||||
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
|
"format": "prettier --ignore-path .gitignore './**/*.{css,yml,js,ts,tsx,json}' --write",
|
||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"deploy:s3": "bash scripts/deploy-s3.sh",
|
"deploy:s3": "bash scripts/deploy-s3.sh",
|
||||||
"postinstall": "husky install",
|
"postinstall": "husky install",
|
||||||
"codegen:apollo": "apollo client:codegen --target typescript --tsFileExtension=d.ts --outputFlat src/@types/apollo/"
|
"codegen:apollo": "apollo client:codegen --endpoint=https://subgraphv4.rinkeby.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@coingecko/cryptoformat": "^0.4.4",
|
"@coingecko/cryptoformat": "^0.4.4",
|
||||||
|
@ -13,7 +13,7 @@ import {
|
|||||||
getUserTokenOrders
|
getUserTokenOrders
|
||||||
} from '@utils/subgraph'
|
} from '@utils/subgraph'
|
||||||
import { useUserPreferences } from './UserPreferences'
|
import { useUserPreferences } from './UserPreferences'
|
||||||
import { PoolShares_poolShares as PoolShare } from '../@types/apollo/PoolShares'
|
import { PoolShares_poolShares as PoolShare } from '../@types/subgraph/PoolShares'
|
||||||
import { Asset, LoggerInstance } from '@oceanprotocol/lib'
|
import { Asset, LoggerInstance } from '@oceanprotocol/lib'
|
||||||
import { getDownloadAssets, getPublishedAssets } from '@utils/aquarius'
|
import { getDownloadAssets, getPublishedAssets } from '@utils/aquarius'
|
||||||
import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
import { AssetSelectionAsset } from '@shared/FormFields/AssetSelection'
|
import { AssetSelectionAsset } from '@shared/FormFields/AssetSelection'
|
||||||
import { PriceList, getAssetsPriceList } from './subgraph'
|
import { PriceList, getAssetsPriceList } from './subgraph'
|
||||||
import axios, { CancelToken, AxiosResponse } from 'axios'
|
import axios, { CancelToken, AxiosResponse } from 'axios'
|
||||||
import { OrdersData_orders as OrdersData } from '../@types/apollo/OrdersData'
|
import { OrdersData_orders as OrdersData } from '../@types/subgraph/OrdersData'
|
||||||
import { metadataCacheUri } from '../../app.config'
|
import { metadataCacheUri } from '../../app.config'
|
||||||
import {
|
import {
|
||||||
SortDirectionOptions,
|
SortDirectionOptions,
|
||||||
|
@ -5,26 +5,26 @@ import { getOceanConfig } from './ocean'
|
|||||||
import {
|
import {
|
||||||
AssetsPoolPrice,
|
AssetsPoolPrice,
|
||||||
AssetsPoolPrice_pools as AssetsPoolPricePool
|
AssetsPoolPrice_pools as AssetsPoolPricePool
|
||||||
} from '../@types/apollo/AssetsPoolPrice'
|
} from '../@types/subgraph/AssetsPoolPrice'
|
||||||
import {
|
import {
|
||||||
AssetsFrePrice,
|
AssetsFrePrice,
|
||||||
AssetsFrePrice_fixedRateExchanges as AssetsFrePriceFixedRateExchange
|
AssetsFrePrice_fixedRateExchanges as AssetsFrePriceFixedRateExchange
|
||||||
} from '../@types/apollo/AssetsFrePrice'
|
} from '../@types/subgraph/AssetsFrePrice'
|
||||||
import {
|
import {
|
||||||
AssetsFreePrice,
|
AssetsFreePrice,
|
||||||
AssetsFreePrice_dispensers as AssetFreePriceDispenser
|
AssetsFreePrice_dispensers as AssetFreePriceDispenser
|
||||||
} from '../@types/apollo/AssetsFreePrice'
|
} from '../@types/subgraph/AssetsFreePrice'
|
||||||
import { AssetPreviousOrder } from '../@types/apollo/AssetPreviousOrder'
|
import { AssetPreviousOrder } from '../@types/subgraph/AssetPreviousOrder'
|
||||||
import {
|
import {
|
||||||
HighestLiquidityAssets_pools as HighestLiquidityAssetsPool,
|
HighestLiquidityAssets_pools as HighestLiquidityAssetsPool,
|
||||||
HighestLiquidityAssets as HighestLiquidityGraphAssets
|
HighestLiquidityAssets as HighestLiquidityGraphAssets
|
||||||
} from '../@types/apollo/HighestLiquidityAssets'
|
} from '../@types/subgraph/HighestLiquidityAssets'
|
||||||
import {
|
import {
|
||||||
PoolShares as PoolSharesList,
|
PoolShares as PoolSharesList,
|
||||||
PoolShares_poolShares as PoolShare
|
PoolShares_poolShares as PoolShare
|
||||||
} from '../@types/apollo/PoolShares'
|
} from '../@types/subgraph/PoolShares'
|
||||||
import { OrdersData_orders as OrdersData } from '../@types/apollo/OrdersData'
|
import { OrdersData_orders as OrdersData } from '../@types/subgraph/OrdersData'
|
||||||
import { UserSalesQuery as UsersSalesList } from '../@types/apollo/UserSalesQuery'
|
import { UserSalesQuery as UsersSalesList } from '../@types/subgraph/UserSalesQuery'
|
||||||
|
|
||||||
export interface UserLiquidity {
|
export interface UserLiquidity {
|
||||||
price: string
|
price: string
|
||||||
|
@ -4,7 +4,7 @@ import Table from '@shared/atoms/Table'
|
|||||||
import AssetTitle from '@shared/AssetList/AssetListTitle'
|
import AssetTitle from '@shared/AssetList/AssetListTitle'
|
||||||
import { useUserPreferences } from '@context/UserPreferences'
|
import { useUserPreferences } from '@context/UserPreferences'
|
||||||
import { gql } from 'urql'
|
import { gql } from 'urql'
|
||||||
import { TransactionHistory_poolTransactions as TransactionHistoryPoolTransactions } from '../../../@types/apollo/TransactionHistory'
|
import { TransactionHistory_poolTransactions as TransactionHistoryPoolTransactions } from '../../../@types/subgraph/TransactionHistory'
|
||||||
import web3 from 'web3'
|
import web3 from 'web3'
|
||||||
import { fetchDataForMultipleChains } from '@utils/subgraph'
|
import { fetchDataForMultipleChains } from '@utils/subgraph'
|
||||||
import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
||||||
|
@ -6,7 +6,7 @@ import { useSiteMetadata } from '@hooks/useSiteMetadata'
|
|||||||
import { useAsset } from '@context/Asset'
|
import { useAsset } from '@context/Asset'
|
||||||
import { gql } from 'urql'
|
import { gql } from 'urql'
|
||||||
import { fetchData, getQueryContext } from '@utils/subgraph'
|
import { fetchData, getQueryContext } from '@utils/subgraph'
|
||||||
import { OrdersData } from '../../../@types/apollo/OrdersData'
|
import { OrdersData } from '../../../@types/subgraph/OrdersData'
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import { useWeb3 } from '@context/Web3'
|
import { useWeb3 } from '@context/Web3'
|
||||||
import { usePricing } from '@hooks/usePricing'
|
import { usePricing } from '@hooks/usePricing'
|
||||||
|
@ -17,7 +17,7 @@ import Button from '@shared/atoms/Button'
|
|||||||
import { LoggerInstance } from '@oceanprotocol/lib'
|
import { LoggerInstance } from '@oceanprotocol/lib'
|
||||||
import { useAsset } from '@context/Asset'
|
import { useAsset } from '@context/Asset'
|
||||||
import { gql, OperationResult } from 'urql'
|
import { gql, OperationResult } from 'urql'
|
||||||
import { PoolHistory } from '../../../../@types/apollo/PoolHistory'
|
import { PoolHistory } from '../../../../@types/subgraph/PoolHistory'
|
||||||
import { fetchData, getQueryContext } from '@utils/subgraph'
|
import { fetchData, getQueryContext } from '@utils/subgraph'
|
||||||
import styles from './Graph.module.css'
|
import styles from './Graph.module.css'
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import AssetActionHistoryTable from '../AssetActionHistoryTable'
|
|||||||
import Graph from './Graph'
|
import Graph from './Graph'
|
||||||
import { useAsset } from '@context/Asset'
|
import { useAsset } from '@context/Asset'
|
||||||
import { gql, OperationResult } from 'urql'
|
import { gql, OperationResult } from 'urql'
|
||||||
import { PoolLiquidity } from '../../../../@types/apollo/PoolLiquidity'
|
import { PoolLiquidity } from '../../../../@types/subgraph/PoolLiquidity'
|
||||||
import { useWeb3 } from '@context/Web3'
|
import { useWeb3 } from '@context/Web3'
|
||||||
import PoolTransactions from '@shared/PoolTransactions'
|
import PoolTransactions from '@shared/PoolTransactions'
|
||||||
import { fetchData, getQueryContext } from '@utils/subgraph'
|
import { fetchData, getQueryContext } from '@utils/subgraph'
|
||||||
|
@ -3,7 +3,7 @@ import { useAsset } from '@context/Asset'
|
|||||||
import ExplorerLink from '@shared/ExplorerLink'
|
import ExplorerLink from '@shared/ExplorerLink'
|
||||||
import Time from '@shared/atoms/Time'
|
import Time from '@shared/atoms/Time'
|
||||||
import { gql, OperationContext, useQuery } from 'urql'
|
import { gql, OperationContext, useQuery } from 'urql'
|
||||||
import { ReceiptData_nftUpdates as ReceiptData } from '../../../@types/apollo/ReceiptData'
|
import { ReceiptData_nftUpdates as ReceiptData } from '../../../@types/subgraph/ReceiptData'
|
||||||
import { getQueryContext } from '@utils/subgraph'
|
import { getQueryContext } from '@utils/subgraph'
|
||||||
import styles from './EditHistory.module.css'
|
import styles from './EditHistory.module.css'
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import Conversion from '@shared/Price/Conversion'
|
|||||||
import NumberUnit from './NumberUnit'
|
import NumberUnit from './NumberUnit'
|
||||||
import styles from './Stats.module.css'
|
import styles from './Stats.module.css'
|
||||||
import { useProfile } from '@context/Profile'
|
import { useProfile } from '@context/Profile'
|
||||||
import { PoolShares_poolShares as PoolShare } from '../../../@types/apollo/PoolShares'
|
import { PoolShares_poolShares as PoolShare } from '../../../@types/subgraph/PoolShares'
|
||||||
|
|
||||||
async function getPoolSharesLiquidity(
|
async function getPoolSharesLiquidity(
|
||||||
poolShares: PoolShare[]
|
poolShares: PoolShare[]
|
||||||
|
@ -3,7 +3,7 @@ import Table from '@shared/atoms/Table'
|
|||||||
import Conversion from '@shared/Price/Conversion'
|
import Conversion from '@shared/Price/Conversion'
|
||||||
import styles from './PoolShares.module.css'
|
import styles from './PoolShares.module.css'
|
||||||
import AssetTitle from '@shared/AssetList/AssetListTitle'
|
import AssetTitle from '@shared/AssetList/AssetListTitle'
|
||||||
import { PoolShares_poolShares as PoolShare } from '../../../@types/apollo/PoolShares'
|
import { PoolShares_poolShares as PoolShare } from '../../../@types/subgraph/PoolShares'
|
||||||
import web3 from 'web3'
|
import web3 from 'web3'
|
||||||
import Token from '../../Asset/AssetActions/Pool/Token'
|
import Token from '../../Asset/AssetActions/Pool/Token'
|
||||||
import { calculateUserLiquidity } from '@utils/subgraph'
|
import { calculateUserLiquidity } from '@utils/subgraph'
|
||||||
|
Loading…
Reference in New Issue
Block a user