diff --git a/explorer/codegen.ts b/explorer/codegen.ts index 9c7b82d90..ac1e825e9 100644 --- a/explorer/codegen.ts +++ b/explorer/codegen.ts @@ -6,10 +6,10 @@ dotenv.config() const config: CodegenConfig = { generates: { - './gql/graphql.ts': { + './gql/graphql.tsx': { schema: defaultIndexer.indexer, documents: ['./src/**/query.ts'], - plugins: ['typescript', 'typescript-operations'], + plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'], }, }, } diff --git a/explorer/gql/graphql.ts b/explorer/gql/graphql.tsx similarity index 81% rename from explorer/gql/graphql.ts rename to explorer/gql/graphql.tsx index 9a7c342b9..56b374af9 100644 --- a/explorer/gql/graphql.ts +++ b/explorer/gql/graphql.tsx @@ -1,3 +1,5 @@ +import { gql } from '@apollo/client'; +import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -5,6 +7,7 @@ export type MakeOptional = Omit & { [SubKey in K]?: export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: { input: string; output: string; } @@ -17888,13 +17891,26 @@ export type ExtrinsicsByHashQueryVariables = Exact<{ export type ExtrinsicsByHashQuery = { __typename?: 'query_root', consensus_extrinsics: Array<{ __typename?: 'consensus_extrinsics', id: string, hash: string, index_in_block: number, success: boolean, name: string, nonce: any, block?: { __typename?: 'consensus_blocks', id: string, timestamp: any, height: any } | null }> }; -export type HomeQueryQueryVariables = Exact<{ +export type HomeQueryQueryVariables = Exact<{ [key: string]: never; }>; + + +export type HomeQueryQuery = { __typename?: 'query_root', consensus_blocks: Array<{ __typename?: 'consensus_blocks', height: any, timestamp: any, space_pledged: any, blockchain_size: any }>, consensus_accounts_aggregate: { __typename?: 'consensus_accounts_aggregate', aggregate?: { __typename?: 'consensus_accounts_aggregate_fields', count: number } | null }, consensus_extrinsics_aggregate: { __typename?: 'consensus_extrinsics_aggregate', aggregate?: { __typename?: 'consensus_extrinsics_aggregate_fields', count: number } | null } }; + +export type HomeSubscriptionBlocksListSubscriptionVariables = Exact<{ + limit: Scalars['Int']['input']; + offset: Scalars['Int']['input']; +}>; + + +export type HomeSubscriptionBlocksListSubscription = { __typename?: 'subscription_root', consensus_blocks: Array<{ __typename?: 'consensus_blocks', id: string, hash: string, height: any, timestamp: any, state_root: string, blockchain_size: any, space_pledged: any, extrinsics_count: number, events_count: number }> }; + +export type HomeSubscriptionExtrinsicsListSubscriptionVariables = Exact<{ limit: Scalars['Int']['input']; offset: Scalars['Int']['input']; }>; -export type HomeQueryQuery = { __typename?: 'query_root', consensus_blocks: Array<{ __typename?: 'consensus_blocks', id: string, hash: string, height: any, timestamp: any, state_root: string, blockchain_size: any, space_pledged: any, extrinsics_count: number, events_count: number }>, consensus_extrinsics: Array<{ __typename?: 'consensus_extrinsics', hash: string, id: string, success: boolean, index_in_block: number, timestamp: any, block_height: any, name: string }>, consensus_accounts_aggregate: { __typename?: 'consensus_accounts_aggregate', aggregate?: { __typename?: 'consensus_accounts_aggregate_fields', count: number } | null }, accountsWithBalanceCount: { __typename?: 'consensus_accounts_aggregate', aggregate?: { __typename?: 'consensus_accounts_aggregate_fields', count: number } | null }, consensus_extrinsics_aggregate: { __typename?: 'consensus_extrinsics_aggregate', aggregate?: { __typename?: 'consensus_extrinsics_aggregate_fields', count: number } | null }, signedExtrinsics: { __typename?: 'consensus_extrinsics_aggregate', aggregate?: { __typename?: 'consensus_extrinsics_aggregate_fields', count: number } | null } }; +export type HomeSubscriptionExtrinsicsListSubscription = { __typename?: 'subscription_root', consensus_extrinsics: Array<{ __typename?: 'consensus_extrinsics', hash: string, id: string, success: boolean, index_in_block: number, timestamp: any, block_height: any, name: string }> }; export type LogsQueryVariables = Exact<{ limit: Scalars['Int']['input']; @@ -18274,3 +18290,3841 @@ export type LastBlockQueryVariables = Exact<{ [key: string]: never; }>; export type LastBlockQuery = { __typename?: 'query_root', lastBlock: Array<{ __typename?: 'consensus_blocks', height: any }> }; + + +export const AccountsDocument = gql` + query Accounts($limit: Int!, $offset: Int, $orderBy: [consensus_accounts_order_by!]!, $where: consensus_accounts_bool_exp) { + consensus_accounts_aggregate(where: $where) { + aggregate { + count + } + } + consensus_accounts( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + nonce + free + reserved + total + createdAt: created_at + updatedAt: updated_at + extrinsicsCount: extrinsics_aggregate { + aggregate { + count + } + } + } +} + `; + +/** + * __useAccountsQuery__ + * + * To run a query within a React component, call `useAccountsQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountsQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountsDocument, options); + } +export function useAccountsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountsDocument, options); + } +export function useAccountsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountsDocument, options); + } +export type AccountsQueryHookResult = ReturnType; +export type AccountsLazyQueryHookResult = ReturnType; +export type AccountsSuspenseQueryHookResult = ReturnType; +export type AccountsQueryResult = Apollo.QueryResult; +export const AccountByIdDocument = gql` + query AccountById($accountId: String!) { + consensus_account_histories( + where: {id: {_eq: $accountId}} + limit: 1 + order_by: {_block_range: desc} + ) { + id + free + reserved + total + nonce + } + consensus_rewards( + limit: 10 + order_by: {block_height: desc} + where: {account_id: {_eq: $accountId}, amount: {_gt: 0}} + ) { + id + blockHeight: block_height + rewardType: reward_type + amount + timestamp + } +} + `; + +/** + * __useAccountByIdQuery__ + * + * To run a query within a React component, call `useAccountByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountByIdQuery({ + * variables: { + * accountId: // value for 'accountId' + * }, + * }); + */ +export function useAccountByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountByIdDocument, options); + } +export function useAccountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountByIdDocument, options); + } +export function useAccountByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountByIdDocument, options); + } +export type AccountByIdQueryHookResult = ReturnType; +export type AccountByIdLazyQueryHookResult = ReturnType; +export type AccountByIdSuspenseQueryHookResult = ReturnType; +export type AccountByIdQueryResult = Apollo.QueryResult; +export const LatestRewardsWeekDocument = gql` + query LatestRewardsWeek($accountId: String!, $timestampComparison: timestamp_comparison_exp!) { + consensus_rewards( + limit: 500 + order_by: {block_height: desc} + where: {timestamp: $timestampComparison, account_id: {_eq: $accountId}, amount: {_gt: 0}} + ) { + id + block_height + index_in_block + reward_type + amount + timestamp + } +} + `; + +/** + * __useLatestRewardsWeekQuery__ + * + * To run a query within a React component, call `useLatestRewardsWeekQuery` and pass it any options that fit your needs. + * When your component renders, `useLatestRewardsWeekQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useLatestRewardsWeekQuery({ + * variables: { + * accountId: // value for 'accountId' + * timestampComparison: // value for 'timestampComparison' + * }, + * }); + */ +export function useLatestRewardsWeekQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: LatestRewardsWeekQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(LatestRewardsWeekDocument, options); + } +export function useLatestRewardsWeekLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(LatestRewardsWeekDocument, options); + } +export function useLatestRewardsWeekSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(LatestRewardsWeekDocument, options); + } +export type LatestRewardsWeekQueryHookResult = ReturnType; +export type LatestRewardsWeekLazyQueryHookResult = ReturnType; +export type LatestRewardsWeekSuspenseQueryHookResult = ReturnType; +export type LatestRewardsWeekQueryResult = Apollo.QueryResult; +export const RewardsListDocument = gql` + query RewardsList($accountId: String!, $limit: Int!, $offset: Int, $sortBy: [consensus_rewards_order_by!]!) { + consensus_rewards_aggregate( + where: {account_id: {_eq: $accountId}, amount: {_gt: 0}} + ) { + aggregate { + count + } + } + consensus_rewards( + order_by: $sortBy + limit: $limit + offset: $offset + where: {account_id: {_eq: $accountId}, amount: {_gt: 0}} + ) { + id + block_height + index_in_block + reward_type + amount + timestamp + block { + hash + id + height + } + account { + id + free + reserved + total + updated_at + } + } +} + `; + +/** + * __useRewardsListQuery__ + * + * To run a query within a React component, call `useRewardsListQuery` and pass it any options that fit your needs. + * When your component renders, `useRewardsListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useRewardsListQuery({ + * variables: { + * accountId: // value for 'accountId' + * limit: // value for 'limit' + * offset: // value for 'offset' + * sortBy: // value for 'sortBy' + * }, + * }); + */ +export function useRewardsListQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: RewardsListQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(RewardsListDocument, options); + } +export function useRewardsListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(RewardsListDocument, options); + } +export function useRewardsListSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(RewardsListDocument, options); + } +export type RewardsListQueryHookResult = ReturnType; +export type RewardsListLazyQueryHookResult = ReturnType; +export type RewardsListSuspenseQueryHookResult = ReturnType; +export type RewardsListQueryResult = Apollo.QueryResult; +export const ExtrinsicsByAccountIdDocument = gql` + query ExtrinsicsByAccountId($limit: Int!, $offset: Int, $where: consensus_extrinsics_bool_exp, $orderBy: [consensus_extrinsics_order_by!]!) { + consensus_extrinsics_aggregate(where: $where) { + aggregate { + count + } + } + consensus_extrinsics( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sort_id + hash + name + success + block_height + timestamp + index_in_block + } +} + `; + +/** + * __useExtrinsicsByAccountIdQuery__ + * + * To run a query within a React component, call `useExtrinsicsByAccountIdQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsByAccountIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsByAccountIdQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * where: // value for 'where' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useExtrinsicsByAccountIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsByAccountIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsByAccountIdDocument, options); + } +export function useExtrinsicsByAccountIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsByAccountIdDocument, options); + } +export function useExtrinsicsByAccountIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsByAccountIdDocument, options); + } +export type ExtrinsicsByAccountIdQueryHookResult = ReturnType; +export type ExtrinsicsByAccountIdLazyQueryHookResult = ReturnType; +export type ExtrinsicsByAccountIdSuspenseQueryHookResult = ReturnType; +export type ExtrinsicsByAccountIdQueryResult = Apollo.QueryResult; +export const TransfersByAccountIdDocument = gql` + query TransfersByAccountId($limit: Int!, $offset: Int, $where: consensus_transfers_bool_exp, $orderBy: [consensus_transfers_order_by!]!) { + consensus_transfers_aggregate(where: $where) { + aggregate { + count + } + } + consensus_transfers( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + extrinsic_id + event_id + from + to + value + fee + success + timestamp + date + created_at + } +} + `; + +/** + * __useTransfersByAccountIdQuery__ + * + * To run a query within a React component, call `useTransfersByAccountIdQuery` and pass it any options that fit your needs. + * When your component renders, `useTransfersByAccountIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useTransfersByAccountIdQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * where: // value for 'where' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useTransfersByAccountIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: TransfersByAccountIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(TransfersByAccountIdDocument, options); + } +export function useTransfersByAccountIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(TransfersByAccountIdDocument, options); + } +export function useTransfersByAccountIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(TransfersByAccountIdDocument, options); + } +export type TransfersByAccountIdQueryHookResult = ReturnType; +export type TransfersByAccountIdLazyQueryHookResult = ReturnType; +export type TransfersByAccountIdSuspenseQueryHookResult = ReturnType; +export type TransfersByAccountIdQueryResult = Apollo.QueryResult; +export const BalanceHistoryByAccountIdDocument = gql` + query BalanceHistoryByAccountId($limit: Int!, $offset: Int, $where: consensus_account_histories_bool_exp, $orderBy: [consensus_account_histories_order_by!]!) { + consensus_account_histories_aggregate(where: $where) { + aggregate { + count + } + } + consensus_account_histories( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id: uuid + reserved + total + nonce + free + created_at + updated_at + _block_range + } +} + `; + +/** + * __useBalanceHistoryByAccountIdQuery__ + * + * To run a query within a React component, call `useBalanceHistoryByAccountIdQuery` and pass it any options that fit your needs. + * When your component renders, `useBalanceHistoryByAccountIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useBalanceHistoryByAccountIdQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * where: // value for 'where' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useBalanceHistoryByAccountIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: BalanceHistoryByAccountIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(BalanceHistoryByAccountIdDocument, options); + } +export function useBalanceHistoryByAccountIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(BalanceHistoryByAccountIdDocument, options); + } +export function useBalanceHistoryByAccountIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(BalanceHistoryByAccountIdDocument, options); + } +export type BalanceHistoryByAccountIdQueryHookResult = ReturnType; +export type BalanceHistoryByAccountIdLazyQueryHookResult = ReturnType; +export type BalanceHistoryByAccountIdSuspenseQueryHookResult = ReturnType; +export type BalanceHistoryByAccountIdQueryResult = Apollo.QueryResult; +export const AllRewardForAccountByIdDocument = gql` + query AllRewardForAccountById($accountId: String!) { + consensus_rewards( + where: {account_id: {_eq: $accountId}, amount: {_gt: 0}} + limit: 1 + ) { + id + block_height + index_in_block + reward_type + amount + timestamp + } +} + `; + +/** + * __useAllRewardForAccountByIdQuery__ + * + * To run a query within a React component, call `useAllRewardForAccountByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useAllRewardForAccountByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAllRewardForAccountByIdQuery({ + * variables: { + * accountId: // value for 'accountId' + * }, + * }); + */ +export function useAllRewardForAccountByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AllRewardForAccountByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AllRewardForAccountByIdDocument, options); + } +export function useAllRewardForAccountByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AllRewardForAccountByIdDocument, options); + } +export function useAllRewardForAccountByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AllRewardForAccountByIdDocument, options); + } +export type AllRewardForAccountByIdQueryHookResult = ReturnType; +export type AllRewardForAccountByIdLazyQueryHookResult = ReturnType; +export type AllRewardForAccountByIdSuspenseQueryHookResult = ReturnType; +export type AllRewardForAccountByIdQueryResult = Apollo.QueryResult; +export const BlocksDocument = gql` + query Blocks($limit: Int!, $offset: Int, $orderBy: [consensus_blocks_order_by!]!, $where: consensus_blocks_bool_exp) { + consensus_blocks_aggregate(where: $where) { + aggregate { + count + } + } + consensus_blocks( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + height + hash + timestamp + parentHash: parent_hash + specId: spec_id + stateRoot: state_root + extrinsicsRoot: extrinsics_root + spacePledged: space_pledged + blockchainSize: blockchain_size + extrinsicsCount: extrinsics_count + eventsCount: events_count + authorId: author_id + } +} + `; + +/** + * __useBlocksQuery__ + * + * To run a query within a React component, call `useBlocksQuery` and pass it any options that fit your needs. + * When your component renders, `useBlocksQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useBlocksQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useBlocksQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: BlocksQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(BlocksDocument, options); + } +export function useBlocksLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(BlocksDocument, options); + } +export function useBlocksSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(BlocksDocument, options); + } +export type BlocksQueryHookResult = ReturnType; +export type BlocksLazyQueryHookResult = ReturnType; +export type BlocksSuspenseQueryHookResult = ReturnType; +export type BlocksQueryResult = Apollo.QueryResult; +export const BlockByIdDocument = gql` + query BlockById($blockId: numeric!, $blockHash: String!) { + consensus_blocks( + where: {_or: [{height: {_eq: $blockId}}, {hash: {_eq: $blockHash}}]} + ) { + id + height + hash + state_root + timestamp + extrinsics_root + spec_id + parent_hash + extrinsics_count + events_count + logs(limit: 10, order_by: {block_height: desc}) { + block_height + block { + timestamp + } + kind + id + } + author_id + } +} + `; + +/** + * __useBlockByIdQuery__ + * + * To run a query within a React component, call `useBlockByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useBlockByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useBlockByIdQuery({ + * variables: { + * blockId: // value for 'blockId' + * blockHash: // value for 'blockHash' + * }, + * }); + */ +export function useBlockByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: BlockByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(BlockByIdDocument, options); + } +export function useBlockByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(BlockByIdDocument, options); + } +export function useBlockByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(BlockByIdDocument, options); + } +export type BlockByIdQueryHookResult = ReturnType; +export type BlockByIdLazyQueryHookResult = ReturnType; +export type BlockByIdSuspenseQueryHookResult = ReturnType; +export type BlockByIdQueryResult = Apollo.QueryResult; +export const ExtrinsicsByBlockIdDocument = gql` + query ExtrinsicsByBlockId($blockId: numeric!, $limit: Int!, $offset: Int, $orderBy: [consensus_extrinsics_order_by!]) { + consensus_extrinsics_aggregate(where: {block_height: {_eq: $blockId}}) { + aggregate { + count + } + } + consensus_extrinsics( + order_by: $orderBy + limit: $limit + offset: $offset + where: {block_height: {_eq: $blockId}} + ) { + id + hash + name + success + block_height + timestamp + index_in_block + } +} + `; + +/** + * __useExtrinsicsByBlockIdQuery__ + * + * To run a query within a React component, call `useExtrinsicsByBlockIdQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsByBlockIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsByBlockIdQuery({ + * variables: { + * blockId: // value for 'blockId' + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useExtrinsicsByBlockIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsByBlockIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsByBlockIdDocument, options); + } +export function useExtrinsicsByBlockIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsByBlockIdDocument, options); + } +export function useExtrinsicsByBlockIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsByBlockIdDocument, options); + } +export type ExtrinsicsByBlockIdQueryHookResult = ReturnType; +export type ExtrinsicsByBlockIdLazyQueryHookResult = ReturnType; +export type ExtrinsicsByBlockIdSuspenseQueryHookResult = ReturnType; +export type ExtrinsicsByBlockIdQueryResult = Apollo.QueryResult; +export const EventsByBlockIdDocument = gql` + query EventsByBlockId($blockId: numeric!, $limit: Int!, $offset: Int, $orderBy: [consensus_events_order_by!]) { + consensus_events_aggregate(where: {block_height: {_eq: $blockId}}) { + aggregate { + count + } + } + consensus_events( + order_by: $orderBy + limit: $limit + offset: $offset + where: {block_height: {_eq: $blockId}} + ) { + id + name + phase + index_in_block + block_height + extrinsic_id + } +} + `; + +/** + * __useEventsByBlockIdQuery__ + * + * To run a query within a React component, call `useEventsByBlockIdQuery` and pass it any options that fit your needs. + * When your component renders, `useEventsByBlockIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useEventsByBlockIdQuery({ + * variables: { + * blockId: // value for 'blockId' + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useEventsByBlockIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: EventsByBlockIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(EventsByBlockIdDocument, options); + } +export function useEventsByBlockIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(EventsByBlockIdDocument, options); + } +export function useEventsByBlockIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(EventsByBlockIdDocument, options); + } +export type EventsByBlockIdQueryHookResult = ReturnType; +export type EventsByBlockIdLazyQueryHookResult = ReturnType; +export type EventsByBlockIdSuspenseQueryHookResult = ReturnType; +export type EventsByBlockIdQueryResult = Apollo.QueryResult; +export const BlocksByHashDocument = gql` + query BlocksByHash($hash: String!) { + consensus_blocks(limit: 10, where: {hash: {_eq: $hash}}) { + id + height + } +} + `; + +/** + * __useBlocksByHashQuery__ + * + * To run a query within a React component, call `useBlocksByHashQuery` and pass it any options that fit your needs. + * When your component renders, `useBlocksByHashQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useBlocksByHashQuery({ + * variables: { + * hash: // value for 'hash' + * }, + * }); + */ +export function useBlocksByHashQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: BlocksByHashQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(BlocksByHashDocument, options); + } +export function useBlocksByHashLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(BlocksByHashDocument, options); + } +export function useBlocksByHashSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(BlocksByHashDocument, options); + } +export type BlocksByHashQueryHookResult = ReturnType; +export type BlocksByHashLazyQueryHookResult = ReturnType; +export type BlocksByHashSuspenseQueryHookResult = ReturnType; +export type BlocksByHashQueryResult = Apollo.QueryResult; +export const EventsDocument = gql` + query Events($limit: Int!, $offset: Int, $orderBy: [consensus_events_order_by!]!, $where: consensus_events_bool_exp) { + consensus_events_aggregate(where: $where) { + aggregate { + count + } + } + consensus_events( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + blockHeight: block_height + blockHash: block_hash + extrinsicId: extrinsic_id + extrinsicHash: extrinsic_hash + section + module + name + indexInBlock: index_in_block + timestamp + phase + } + consensus_event_modules(limit: 300) { + method + } +} + `; + +/** + * __useEventsQuery__ + * + * To run a query within a React component, call `useEventsQuery` and pass it any options that fit your needs. + * When your component renders, `useEventsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useEventsQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useEventsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: EventsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(EventsDocument, options); + } +export function useEventsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(EventsDocument, options); + } +export function useEventsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(EventsDocument, options); + } +export type EventsQueryHookResult = ReturnType; +export type EventsLazyQueryHookResult = ReturnType; +export type EventsSuspenseQueryHookResult = ReturnType; +export type EventsQueryResult = Apollo.QueryResult; +export const EventByIdDocument = gql` + query EventById($eventId: String!) { + consensus_events(where: {id: {_eq: $eventId}}) { + args + id + index_in_block + name + phase + timestamp + extrinsic { + args + success + tip + fee + id + signer + } + block { + height + id + timestamp + spec_id + hash + } + } +} + `; + +/** + * __useEventByIdQuery__ + * + * To run a query within a React component, call `useEventByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useEventByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useEventByIdQuery({ + * variables: { + * eventId: // value for 'eventId' + * }, + * }); + */ +export function useEventByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: EventByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(EventByIdDocument, options); + } +export function useEventByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(EventByIdDocument, options); + } +export function useEventByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(EventByIdDocument, options); + } +export type EventByIdQueryHookResult = ReturnType; +export type EventByIdLazyQueryHookResult = ReturnType; +export type EventByIdSuspenseQueryHookResult = ReturnType; +export type EventByIdQueryResult = Apollo.QueryResult; +export const ExtrinsicsDocument = gql` + query Extrinsics($limit: Int!, $offset: Int, $orderBy: [consensus_extrinsics_order_by!]!, $where: consensus_extrinsics_bool_exp) { + consensus_extrinsics_aggregate(where: $where) { + aggregate { + count + } + } + consensus_extrinsics( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + hash + blockHeight: block_height + blockHash: block_hash + section + module + name + indexInBlock: index_in_block + success + timestamp + nonce + signer + signature + tip + fee + } + consensus_extrinsic_modules(limit: 300) { + method + } +} + `; + +/** + * __useExtrinsicsQuery__ + * + * To run a query within a React component, call `useExtrinsicsQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useExtrinsicsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsDocument, options); + } +export function useExtrinsicsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsDocument, options); + } +export function useExtrinsicsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsDocument, options); + } +export type ExtrinsicsQueryHookResult = ReturnType; +export type ExtrinsicsLazyQueryHookResult = ReturnType; +export type ExtrinsicsSuspenseQueryHookResult = ReturnType; +export type ExtrinsicsQueryResult = Apollo.QueryResult; +export const ExtrinsicsByIdDocument = gql` + query ExtrinsicsById($extrinsicId: String!) { + consensus_extrinsics( + where: {_or: [{id: {_eq: $extrinsicId}}, {hash: {_eq: $extrinsicId}}]} + ) { + id + index_in_block + hash + block_height + timestamp + signature + success + tip + args + signer + events_aggregate { + aggregate { + count + } + } + name + } +} + `; + +/** + * __useExtrinsicsByIdQuery__ + * + * To run a query within a React component, call `useExtrinsicsByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsByIdQuery({ + * variables: { + * extrinsicId: // value for 'extrinsicId' + * }, + * }); + */ +export function useExtrinsicsByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsByIdDocument, options); + } +export function useExtrinsicsByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsByIdDocument, options); + } +export function useExtrinsicsByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsByIdDocument, options); + } +export type ExtrinsicsByIdQueryHookResult = ReturnType; +export type ExtrinsicsByIdLazyQueryHookResult = ReturnType; +export type ExtrinsicsByIdSuspenseQueryHookResult = ReturnType; +export type ExtrinsicsByIdQueryResult = Apollo.QueryResult; +export const EventsByExtrinsicIdDocument = gql` + query EventsByExtrinsicId($extrinsicId: String!, $limit: Int!, $offset: Int, $orderBy: [consensus_events_order_by!]) { + consensus_events_aggregate(where: {extrinsic_id: {_eq: $extrinsicId}}) { + aggregate { + count + } + } + consensus_events( + order_by: $orderBy + limit: $limit + offset: $offset + where: {extrinsic_id: {_eq: $extrinsicId}} + ) { + id + name + phase + index_in_block + block_height + extrinsic_id + } +} + `; + +/** + * __useEventsByExtrinsicIdQuery__ + * + * To run a query within a React component, call `useEventsByExtrinsicIdQuery` and pass it any options that fit your needs. + * When your component renders, `useEventsByExtrinsicIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useEventsByExtrinsicIdQuery({ + * variables: { + * extrinsicId: // value for 'extrinsicId' + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * }, + * }); + */ +export function useEventsByExtrinsicIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: EventsByExtrinsicIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(EventsByExtrinsicIdDocument, options); + } +export function useEventsByExtrinsicIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(EventsByExtrinsicIdDocument, options); + } +export function useEventsByExtrinsicIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(EventsByExtrinsicIdDocument, options); + } +export type EventsByExtrinsicIdQueryHookResult = ReturnType; +export type EventsByExtrinsicIdLazyQueryHookResult = ReturnType; +export type EventsByExtrinsicIdSuspenseQueryHookResult = ReturnType; +export type EventsByExtrinsicIdQueryResult = Apollo.QueryResult; +export const ExtrinsicsByHashDocument = gql` + query ExtrinsicsByHash($hash: String!) { + consensus_extrinsics(limit: 10, where: {hash: {_eq: $hash}}) { + id + hash + index_in_block + success + block { + id + timestamp + height + } + name + nonce + } +} + `; + +/** + * __useExtrinsicsByHashQuery__ + * + * To run a query within a React component, call `useExtrinsicsByHashQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsByHashQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsByHashQuery({ + * variables: { + * hash: // value for 'hash' + * }, + * }); + */ +export function useExtrinsicsByHashQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsByHashQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsByHashDocument, options); + } +export function useExtrinsicsByHashLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsByHashDocument, options); + } +export function useExtrinsicsByHashSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsByHashDocument, options); + } +export type ExtrinsicsByHashQueryHookResult = ReturnType; +export type ExtrinsicsByHashLazyQueryHookResult = ReturnType; +export type ExtrinsicsByHashSuspenseQueryHookResult = ReturnType; +export type ExtrinsicsByHashQueryResult = Apollo.QueryResult; +export const HomeQueryDocument = gql` + query HomeQuery { + consensus_blocks(limit: 1, order_by: {sort_id: desc}) { + height + timestamp + space_pledged + blockchain_size + } + consensus_accounts_aggregate { + aggregate { + count + } + } + consensus_extrinsics_aggregate { + aggregate { + count + } + } +} + `; + +/** + * __useHomeQueryQuery__ + * + * To run a query within a React component, call `useHomeQueryQuery` and pass it any options that fit your needs. + * When your component renders, `useHomeQueryQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useHomeQueryQuery({ + * variables: { + * }, + * }); + */ +export function useHomeQueryQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(HomeQueryDocument, options); + } +export function useHomeQueryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(HomeQueryDocument, options); + } +export function useHomeQuerySuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(HomeQueryDocument, options); + } +export type HomeQueryQueryHookResult = ReturnType; +export type HomeQueryLazyQueryHookResult = ReturnType; +export type HomeQuerySuspenseQueryHookResult = ReturnType; +export type HomeQueryQueryResult = Apollo.QueryResult; +export const HomeSubscriptionBlocksListDocument = gql` + subscription HomeSubscriptionBlocksList($limit: Int!, $offset: Int!) { + consensus_blocks(limit: $limit, offset: $offset, order_by: {sort_id: desc}) { + id + hash + height + timestamp + state_root + blockchain_size + space_pledged + extrinsics_count + events_count + } +} + `; + +/** + * __useHomeSubscriptionBlocksListSubscription__ + * + * To run a query within a React component, call `useHomeSubscriptionBlocksListSubscription` and pass it any options that fit your needs. + * When your component renders, `useHomeSubscriptionBlocksListSubscription` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useHomeSubscriptionBlocksListSubscription({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * }, + * }); + */ +export function useHomeSubscriptionBlocksListSubscription(baseOptions: Apollo.SubscriptionHookOptions & ({ variables: HomeSubscriptionBlocksListSubscriptionVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSubscription(HomeSubscriptionBlocksListDocument, options); + } +export type HomeSubscriptionBlocksListSubscriptionHookResult = ReturnType; +export type HomeSubscriptionBlocksListSubscriptionResult = Apollo.SubscriptionResult; +export const HomeSubscriptionExtrinsicsListDocument = gql` + subscription HomeSubscriptionExtrinsicsList($limit: Int!, $offset: Int!) { + consensus_extrinsics( + limit: $limit + offset: $offset + order_by: {timestamp: desc} + ) { + hash + id + success + index_in_block + timestamp + block_height + name + } +} + `; + +/** + * __useHomeSubscriptionExtrinsicsListSubscription__ + * + * To run a query within a React component, call `useHomeSubscriptionExtrinsicsListSubscription` and pass it any options that fit your needs. + * When your component renders, `useHomeSubscriptionExtrinsicsListSubscription` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useHomeSubscriptionExtrinsicsListSubscription({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * }, + * }); + */ +export function useHomeSubscriptionExtrinsicsListSubscription(baseOptions: Apollo.SubscriptionHookOptions & ({ variables: HomeSubscriptionExtrinsicsListSubscriptionVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSubscription(HomeSubscriptionExtrinsicsListDocument, options); + } +export type HomeSubscriptionExtrinsicsListSubscriptionHookResult = ReturnType; +export type HomeSubscriptionExtrinsicsListSubscriptionResult = Apollo.SubscriptionResult; +export const LogsDocument = gql` + query Logs($limit: Int!, $offset: Int, $orderBy: [consensus_logs_order_by!]!, $where: consensus_logs_bool_exp) { + consensus_logs_aggregate(where: $where) { + aggregate { + count + } + } + consensus_logs( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + blockHeight: block_height + blockHash: block_hash + indexInBlock: index_in_block + kind + timestamp + } +} + `; + +/** + * __useLogsQuery__ + * + * To run a query within a React component, call `useLogsQuery` and pass it any options that fit your needs. + * When your component renders, `useLogsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useLogsQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useLogsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: LogsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(LogsDocument, options); + } +export function useLogsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(LogsDocument, options); + } +export function useLogsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(LogsDocument, options); + } +export type LogsQueryHookResult = ReturnType; +export type LogsLazyQueryHookResult = ReturnType; +export type LogsSuspenseQueryHookResult = ReturnType; +export type LogsQueryResult = Apollo.QueryResult; +export const LogByIdDocument = gql` + query LogById($logId: String!) { + consensus_logs(where: {id: {_eq: $logId}}) { + id + kind + value + block_height + timestamp + block { + id + events(limit: 10, order_by: {sort_id: desc}) { + id + args + name + phase + timestamp + block_height + extrinsic_id + } + } + } +} + `; + +/** + * __useLogByIdQuery__ + * + * To run a query within a React component, call `useLogByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useLogByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useLogByIdQuery({ + * variables: { + * logId: // value for 'logId' + * }, + * }); + */ +export function useLogByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: LogByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(LogByIdDocument, options); + } +export function useLogByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(LogByIdDocument, options); + } +export function useLogByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(LogByIdDocument, options); + } +export type LogByIdQueryHookResult = ReturnType; +export type LogByIdLazyQueryHookResult = ReturnType; +export type LogByIdSuspenseQueryHookResult = ReturnType; +export type LogByIdQueryResult = Apollo.QueryResult; +export const DomainsListDocument = gql` + query DomainsList($limit: Int!, $offset: Int, $orderBy: [staking_domains_order_by!]!, $where: staking_domains_bool_exp) { + staking_domains_aggregate(where: $where) { + aggregate { + count + } + } + staking_domains( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + name + accountId: account_id + bundleCount: bundle_count + totalVolume: total_volume + totalTaxCollected: total_tax_collected + totalRewardsCollected: total_rewards_collected + totalDomainExecutionFee: total_domain_execution_fee + totalDeposits: total_deposits + totalConsensusStorageFee: total_consensus_storage_fee + totalBurnedBalance: total_burned_balance + runtimeInfo: runtime_info + runtimeId: runtime_id + runtime + lastDomainBlockNumber: last_domain_block_number + lastBundleAt: last_bundle_at + currentTotalStake: current_total_stake + currentStorageFeeDeposit: current_storage_fee_deposit + currentSharePrice: current_share_price + createdAt: created_at + completedEpoch: completed_epoch + totalTransfersIn: total_transfers_in + transfersInCount: transfers_in_count + totalTransfersOut: total_transfers_out + transfers_out_count + totalRejectedTransfersClaimed: total_rejected_transfers_claimed + rejectedTransfersClaimedCount: rejected_transfers_claimed_count + totalTransfersRejected: total_transfers_rejected + transfersRejectedCount: transfers_rejected_count + updatedAt: updated_at + totalEstimatedWithdrawals: total_estimated_withdrawals + totalWithdrawals: total_withdrawals + currentTotalShares: current_total_shares + current_share_price + accumulated_epoch_stake + accumulatedEpochStorageFeeDeposit: accumulated_epoch_storage_fee_deposit + accumulatedEpochRewards: accumulated_epoch_rewards + accumulatedEpochShares: accumulated_epoch_shares + currentEpochDuration: current_epoch_duration + lastEpochDuration: last_epoch_duration + last6EpochsDuration: last6_epochs_duration + last144EpochDuration: last144_epoch_duration + last1kEpochDuration: last1k_epoch_duration + operatorsAggregate: operators_aggregate { + aggregate { + count + } + } + nominatorsAggregate: nominators_aggregate { + aggregate { + count + } + } + } +} + `; + +/** + * __useDomainsListQuery__ + * + * To run a query within a React component, call `useDomainsListQuery` and pass it any options that fit your needs. + * When your component renders, `useDomainsListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useDomainsListQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useDomainsListQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: DomainsListQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(DomainsListDocument, options); + } +export function useDomainsListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(DomainsListDocument, options); + } +export function useDomainsListSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(DomainsListDocument, options); + } +export type DomainsListQueryHookResult = ReturnType; +export type DomainsListLazyQueryHookResult = ReturnType; +export type DomainsListSuspenseQueryHookResult = ReturnType; +export type DomainsListQueryResult = Apollo.QueryResult; +export const DomainsStatusDocument = gql` + query DomainsStatus($limit: Int!, $offset: Int, $orderBy: [staking_domains_order_by!]!, $where: staking_domains_bool_exp) { + staking_domains( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + name + last_domain_block_number + completed_epoch + current_epoch_duration + last_epoch_duration + last6_epochs_duration + last144_epoch_duration + last1k_epoch_duration + } +} + `; + +/** + * __useDomainsStatusQuery__ + * + * To run a query within a React component, call `useDomainsStatusQuery` and pass it any options that fit your needs. + * When your component renders, `useDomainsStatusQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useDomainsStatusQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useDomainsStatusQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: DomainsStatusQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(DomainsStatusDocument, options); + } +export function useDomainsStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(DomainsStatusDocument, options); + } +export function useDomainsStatusSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(DomainsStatusDocument, options); + } +export type DomainsStatusQueryHookResult = ReturnType; +export type DomainsStatusLazyQueryHookResult = ReturnType; +export type DomainsStatusSuspenseQueryHookResult = ReturnType; +export type DomainsStatusQueryResult = Apollo.QueryResult; +export const DomainByIdDocument = gql` + query DomainById($domainId: String!) { + staking_domains_by_pk(id: $domainId) { + id + sort_id + name + account_id + bundle_count + total_volume + total_tax_collected + total_rewards_collected + total_domain_execution_fee + total_deposits + total_consensus_storage_fee + total_burned_balance + runtime_info + runtime_id + runtime + last_domain_block_number + last_bundle_at + current_total_stake + current_storage_fee_deposit + created_at + completed_epoch + total_transfers_in + transfers_in_count + total_transfers_out + transfers_out_count + total_rejected_transfers_claimed + rejected_transfers_claimed_count + total_transfers_rejected + transfers_rejected_count + updated_at + total_estimated_withdrawals + total_withdrawals + accumulated_epoch_stake + accumulated_epoch_storage_fee_deposit + operators_aggregate { + aggregate { + count + } + } + nominators_aggregate { + aggregate { + count + } + } + deposits_aggregate { + aggregate { + count + } + } + withdrawals_aggregate { + aggregate { + count + } + } + } +} + `; + +/** + * __useDomainByIdQuery__ + * + * To run a query within a React component, call `useDomainByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useDomainByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useDomainByIdQuery({ + * variables: { + * domainId: // value for 'domainId' + * }, + * }); + */ +export function useDomainByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: DomainByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(DomainByIdDocument, options); + } +export function useDomainByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(DomainByIdDocument, options); + } +export function useDomainByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(DomainByIdDocument, options); + } +export type DomainByIdQueryHookResult = ReturnType; +export type DomainByIdLazyQueryHookResult = ReturnType; +export type DomainByIdSuspenseQueryHookResult = ReturnType; +export type DomainByIdQueryResult = Apollo.QueryResult; +export const AccountTransferSenderTotalCountDocument = gql` + query AccountTransferSenderTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_transfer_sender_total_counts_order_by!]!, $where: leaderboard_account_transfer_sender_total_counts_bool_exp) { + leaderboard_account_transfer_sender_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_account_transfer_sender_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountTransferSenderTotalCountQuery__ + * + * To run a query within a React component, call `useAccountTransferSenderTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountTransferSenderTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountTransferSenderTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountTransferSenderTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountTransferSenderTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountTransferSenderTotalCountDocument, options); + } +export function useAccountTransferSenderTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountTransferSenderTotalCountDocument, options); + } +export function useAccountTransferSenderTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountTransferSenderTotalCountDocument, options); + } +export type AccountTransferSenderTotalCountQueryHookResult = ReturnType; +export type AccountTransferSenderTotalCountLazyQueryHookResult = ReturnType; +export type AccountTransferSenderTotalCountSuspenseQueryHookResult = ReturnType; +export type AccountTransferSenderTotalCountQueryResult = Apollo.QueryResult; +export const AccountTransferSenderTotalValueDocument = gql` + query AccountTransferSenderTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_transfer_sender_total_values_order_by!]!, $where: leaderboard_account_transfer_sender_total_values_bool_exp) { + leaderboard_account_transfer_sender_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_account_transfer_sender_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountTransferSenderTotalValueQuery__ + * + * To run a query within a React component, call `useAccountTransferSenderTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountTransferSenderTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountTransferSenderTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountTransferSenderTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountTransferSenderTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountTransferSenderTotalValueDocument, options); + } +export function useAccountTransferSenderTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountTransferSenderTotalValueDocument, options); + } +export function useAccountTransferSenderTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountTransferSenderTotalValueDocument, options); + } +export type AccountTransferSenderTotalValueQueryHookResult = ReturnType; +export type AccountTransferSenderTotalValueLazyQueryHookResult = ReturnType; +export type AccountTransferSenderTotalValueSuspenseQueryHookResult = ReturnType; +export type AccountTransferSenderTotalValueQueryResult = Apollo.QueryResult; +export const AccountTransferReceiverTotalCountDocument = gql` + query AccountTransferReceiverTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_transfer_receiver_total_counts_order_by!]!, $where: leaderboard_account_transfer_receiver_total_counts_bool_exp) { + leaderboard_account_transfer_receiver_total_counts_aggregate( + order_by: $orderBy + where: $where + ) { + aggregate { + count + } + } + leaderboard_account_transfer_receiver_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountTransferReceiverTotalCountQuery__ + * + * To run a query within a React component, call `useAccountTransferReceiverTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountTransferReceiverTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountTransferReceiverTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountTransferReceiverTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountTransferReceiverTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountTransferReceiverTotalCountDocument, options); + } +export function useAccountTransferReceiverTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountTransferReceiverTotalCountDocument, options); + } +export function useAccountTransferReceiverTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountTransferReceiverTotalCountDocument, options); + } +export type AccountTransferReceiverTotalCountQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalCountLazyQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalCountSuspenseQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalCountQueryResult = Apollo.QueryResult; +export const AccountTransferReceiverTotalValueDocument = gql` + query AccountTransferReceiverTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_transfer_receiver_total_values_order_by!]!, $where: leaderboard_account_transfer_receiver_total_values_bool_exp) { + leaderboard_account_transfer_receiver_total_values_aggregate( + order_by: $orderBy + where: $where + ) { + aggregate { + count + } + } + leaderboard_account_transfer_receiver_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountTransferReceiverTotalValueQuery__ + * + * To run a query within a React component, call `useAccountTransferReceiverTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountTransferReceiverTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountTransferReceiverTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountTransferReceiverTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountTransferReceiverTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountTransferReceiverTotalValueDocument, options); + } +export function useAccountTransferReceiverTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountTransferReceiverTotalValueDocument, options); + } +export function useAccountTransferReceiverTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountTransferReceiverTotalValueDocument, options); + } +export type AccountTransferReceiverTotalValueQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalValueLazyQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalValueSuspenseQueryHookResult = ReturnType; +export type AccountTransferReceiverTotalValueQueryResult = Apollo.QueryResult; +export const AccountRemarkCountDocument = gql` + query AccountRemarkCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_remark_counts_order_by!]!, $where: leaderboard_account_remark_counts_bool_exp) { + leaderboard_account_remark_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_account_remark_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountRemarkCountQuery__ + * + * To run a query within a React component, call `useAccountRemarkCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountRemarkCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountRemarkCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountRemarkCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountRemarkCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountRemarkCountDocument, options); + } +export function useAccountRemarkCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountRemarkCountDocument, options); + } +export function useAccountRemarkCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountRemarkCountDocument, options); + } +export type AccountRemarkCountQueryHookResult = ReturnType; +export type AccountRemarkCountLazyQueryHookResult = ReturnType; +export type AccountRemarkCountSuspenseQueryHookResult = ReturnType; +export type AccountRemarkCountQueryResult = Apollo.QueryResult; +export const AccountExtrinsicTotalCountDocument = gql` + query AccountExtrinsicTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_extrinsic_total_counts_order_by!]!, $where: leaderboard_account_extrinsic_total_counts_bool_exp) { + leaderboard_account_extrinsic_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_account_extrinsic_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountExtrinsicTotalCountQuery__ + * + * To run a query within a React component, call `useAccountExtrinsicTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountExtrinsicTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountExtrinsicTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountExtrinsicTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountExtrinsicTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountExtrinsicTotalCountDocument, options); + } +export function useAccountExtrinsicTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountExtrinsicTotalCountDocument, options); + } +export function useAccountExtrinsicTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountExtrinsicTotalCountDocument, options); + } +export type AccountExtrinsicTotalCountQueryHookResult = ReturnType; +export type AccountExtrinsicTotalCountLazyQueryHookResult = ReturnType; +export type AccountExtrinsicTotalCountSuspenseQueryHookResult = ReturnType; +export type AccountExtrinsicTotalCountQueryResult = Apollo.QueryResult; +export const AccountExtrinsicSuccessTotalCountDocument = gql` + query AccountExtrinsicSuccessTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_extrinsic_success_total_counts_order_by!]!, $where: leaderboard_account_extrinsic_success_total_counts_bool_exp) { + leaderboard_account_extrinsic_success_total_counts_aggregate( + order_by: $orderBy + where: $where + ) { + aggregate { + count + } + } + leaderboard_account_extrinsic_success_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountExtrinsicSuccessTotalCountQuery__ + * + * To run a query within a React component, call `useAccountExtrinsicSuccessTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountExtrinsicSuccessTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountExtrinsicSuccessTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountExtrinsicSuccessTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountExtrinsicSuccessTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountExtrinsicSuccessTotalCountDocument, options); + } +export function useAccountExtrinsicSuccessTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountExtrinsicSuccessTotalCountDocument, options); + } +export function useAccountExtrinsicSuccessTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountExtrinsicSuccessTotalCountDocument, options); + } +export type AccountExtrinsicSuccessTotalCountQueryHookResult = ReturnType; +export type AccountExtrinsicSuccessTotalCountLazyQueryHookResult = ReturnType; +export type AccountExtrinsicSuccessTotalCountSuspenseQueryHookResult = ReturnType; +export type AccountExtrinsicSuccessTotalCountQueryResult = Apollo.QueryResult; +export const AccountExtrinsicFailedTotalCountDocument = gql` + query AccountExtrinsicFailedTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_extrinsic_failed_total_counts_order_by!]!, $where: leaderboard_account_extrinsic_failed_total_counts_bool_exp) { + leaderboard_account_extrinsic_failed_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_account_extrinsic_failed_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountExtrinsicFailedTotalCountQuery__ + * + * To run a query within a React component, call `useAccountExtrinsicFailedTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountExtrinsicFailedTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountExtrinsicFailedTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountExtrinsicFailedTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountExtrinsicFailedTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountExtrinsicFailedTotalCountDocument, options); + } +export function useAccountExtrinsicFailedTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountExtrinsicFailedTotalCountDocument, options); + } +export function useAccountExtrinsicFailedTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountExtrinsicFailedTotalCountDocument, options); + } +export type AccountExtrinsicFailedTotalCountQueryHookResult = ReturnType; +export type AccountExtrinsicFailedTotalCountLazyQueryHookResult = ReturnType; +export type AccountExtrinsicFailedTotalCountSuspenseQueryHookResult = ReturnType; +export type AccountExtrinsicFailedTotalCountQueryResult = Apollo.QueryResult; +export const AccountTransactionFeePaidTotalValueDocument = gql` + query AccountTransactionFeePaidTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_account_transaction_fee_paid_total_values_order_by!]!, $where: leaderboard_account_transaction_fee_paid_total_values_bool_exp) { + leaderboard_account_transaction_fee_paid_total_values_aggregate( + order_by: $orderBy + where: $where + ) { + aggregate { + count + } + } + leaderboard_account_transaction_fee_paid_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useAccountTransactionFeePaidTotalValueQuery__ + * + * To run a query within a React component, call `useAccountTransactionFeePaidTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountTransactionFeePaidTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountTransactionFeePaidTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useAccountTransactionFeePaidTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountTransactionFeePaidTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountTransactionFeePaidTotalValueDocument, options); + } +export function useAccountTransactionFeePaidTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountTransactionFeePaidTotalValueDocument, options); + } +export function useAccountTransactionFeePaidTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountTransactionFeePaidTotalValueDocument, options); + } +export type AccountTransactionFeePaidTotalValueQueryHookResult = ReturnType; +export type AccountTransactionFeePaidTotalValueLazyQueryHookResult = ReturnType; +export type AccountTransactionFeePaidTotalValueSuspenseQueryHookResult = ReturnType; +export type AccountTransactionFeePaidTotalValueQueryResult = Apollo.QueryResult; +export const FarmerVoteTotalCountDocument = gql` + query FarmerVoteTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_vote_total_counts_order_by!]!, $where: leaderboard_farmer_vote_total_counts_bool_exp) { + leaderboard_farmer_vote_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_vote_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerVoteTotalCountQuery__ + * + * To run a query within a React component, call `useFarmerVoteTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerVoteTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerVoteTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerVoteTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerVoteTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerVoteTotalCountDocument, options); + } +export function useFarmerVoteTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerVoteTotalCountDocument, options); + } +export function useFarmerVoteTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerVoteTotalCountDocument, options); + } +export type FarmerVoteTotalCountQueryHookResult = ReturnType; +export type FarmerVoteTotalCountLazyQueryHookResult = ReturnType; +export type FarmerVoteTotalCountSuspenseQueryHookResult = ReturnType; +export type FarmerVoteTotalCountQueryResult = Apollo.QueryResult; +export const FarmerVoteTotalValueDocument = gql` + query FarmerVoteTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_vote_total_values_order_by!]!, $where: leaderboard_farmer_vote_total_values_bool_exp) { + leaderboard_farmer_vote_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_vote_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerVoteTotalValueQuery__ + * + * To run a query within a React component, call `useFarmerVoteTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerVoteTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerVoteTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerVoteTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerVoteTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerVoteTotalValueDocument, options); + } +export function useFarmerVoteTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerVoteTotalValueDocument, options); + } +export function useFarmerVoteTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerVoteTotalValueDocument, options); + } +export type FarmerVoteTotalValueQueryHookResult = ReturnType; +export type FarmerVoteTotalValueLazyQueryHookResult = ReturnType; +export type FarmerVoteTotalValueSuspenseQueryHookResult = ReturnType; +export type FarmerVoteTotalValueQueryResult = Apollo.QueryResult; +export const FarmerBlockTotalCountDocument = gql` + query FarmerBlockTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_block_total_counts_order_by!]!, $where: leaderboard_farmer_block_total_counts_bool_exp) { + leaderboard_farmer_block_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_block_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerBlockTotalCountQuery__ + * + * To run a query within a React component, call `useFarmerBlockTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerBlockTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerBlockTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerBlockTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerBlockTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerBlockTotalCountDocument, options); + } +export function useFarmerBlockTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerBlockTotalCountDocument, options); + } +export function useFarmerBlockTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerBlockTotalCountDocument, options); + } +export type FarmerBlockTotalCountQueryHookResult = ReturnType; +export type FarmerBlockTotalCountLazyQueryHookResult = ReturnType; +export type FarmerBlockTotalCountSuspenseQueryHookResult = ReturnType; +export type FarmerBlockTotalCountQueryResult = Apollo.QueryResult; +export const FarmerBlockTotalValueDocument = gql` + query FarmerBlockTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_block_total_values_order_by!]!, $where: leaderboard_farmer_block_total_values_bool_exp) { + leaderboard_farmer_block_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_block_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerBlockTotalValueQuery__ + * + * To run a query within a React component, call `useFarmerBlockTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerBlockTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerBlockTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerBlockTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerBlockTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerBlockTotalValueDocument, options); + } +export function useFarmerBlockTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerBlockTotalValueDocument, options); + } +export function useFarmerBlockTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerBlockTotalValueDocument, options); + } +export type FarmerBlockTotalValueQueryHookResult = ReturnType; +export type FarmerBlockTotalValueLazyQueryHookResult = ReturnType; +export type FarmerBlockTotalValueSuspenseQueryHookResult = ReturnType; +export type FarmerBlockTotalValueQueryResult = Apollo.QueryResult; +export const OperatorTotalRewardsCollectedDocument = gql` + query OperatorTotalRewardsCollected($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_total_rewards_collecteds_order_by!]!, $where: leaderboard_operator_total_rewards_collecteds_bool_exp) { + leaderboard_operator_total_rewards_collecteds_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_total_rewards_collecteds( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorTotalRewardsCollectedQuery__ + * + * To run a query within a React component, call `useOperatorTotalRewardsCollectedQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorTotalRewardsCollectedQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorTotalRewardsCollectedQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorTotalRewardsCollectedQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorTotalRewardsCollectedQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorTotalRewardsCollectedDocument, options); + } +export function useOperatorTotalRewardsCollectedLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorTotalRewardsCollectedDocument, options); + } +export function useOperatorTotalRewardsCollectedSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorTotalRewardsCollectedDocument, options); + } +export type OperatorTotalRewardsCollectedQueryHookResult = ReturnType; +export type OperatorTotalRewardsCollectedLazyQueryHookResult = ReturnType; +export type OperatorTotalRewardsCollectedSuspenseQueryHookResult = ReturnType; +export type OperatorTotalRewardsCollectedQueryResult = Apollo.QueryResult; +export const OperatorTotalTaxCollectedDocument = gql` + query OperatorTotalTaxCollected($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_total_tax_collecteds_order_by!]!, $where: leaderboard_operator_total_tax_collecteds_bool_exp) { + leaderboard_operator_total_tax_collecteds_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_total_tax_collecteds( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorTotalTaxCollectedQuery__ + * + * To run a query within a React component, call `useOperatorTotalTaxCollectedQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorTotalTaxCollectedQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorTotalTaxCollectedQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorTotalTaxCollectedQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorTotalTaxCollectedQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorTotalTaxCollectedDocument, options); + } +export function useOperatorTotalTaxCollectedLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorTotalTaxCollectedDocument, options); + } +export function useOperatorTotalTaxCollectedSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorTotalTaxCollectedDocument, options); + } +export type OperatorTotalTaxCollectedQueryHookResult = ReturnType; +export type OperatorTotalTaxCollectedLazyQueryHookResult = ReturnType; +export type OperatorTotalTaxCollectedSuspenseQueryHookResult = ReturnType; +export type OperatorTotalTaxCollectedQueryResult = Apollo.QueryResult; +export const OperatorBundleTotalCountDocument = gql` + query OperatorBundleTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_bundle_total_counts_order_by!]!, $where: leaderboard_operator_bundle_total_counts_bool_exp) { + leaderboard_operator_bundle_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_bundle_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorBundleTotalCountQuery__ + * + * To run a query within a React component, call `useOperatorBundleTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorBundleTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorBundleTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorBundleTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorBundleTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorBundleTotalCountDocument, options); + } +export function useOperatorBundleTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorBundleTotalCountDocument, options); + } +export function useOperatorBundleTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorBundleTotalCountDocument, options); + } +export type OperatorBundleTotalCountQueryHookResult = ReturnType; +export type OperatorBundleTotalCountLazyQueryHookResult = ReturnType; +export type OperatorBundleTotalCountSuspenseQueryHookResult = ReturnType; +export type OperatorBundleTotalCountQueryResult = Apollo.QueryResult; +export const OperatorDepositsTotalCountDocument = gql` + query OperatorDepositsTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_deposits_total_counts_order_by!]!, $where: leaderboard_operator_deposits_total_counts_bool_exp) { + leaderboard_operator_deposits_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_deposits_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorDepositsTotalCountQuery__ + * + * To run a query within a React component, call `useOperatorDepositsTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorDepositsTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorDepositsTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorDepositsTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorDepositsTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorDepositsTotalCountDocument, options); + } +export function useOperatorDepositsTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorDepositsTotalCountDocument, options); + } +export function useOperatorDepositsTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorDepositsTotalCountDocument, options); + } +export type OperatorDepositsTotalCountQueryHookResult = ReturnType; +export type OperatorDepositsTotalCountLazyQueryHookResult = ReturnType; +export type OperatorDepositsTotalCountSuspenseQueryHookResult = ReturnType; +export type OperatorDepositsTotalCountQueryResult = Apollo.QueryResult; +export const OperatorDepositsTotalValueDocument = gql` + query OperatorDepositsTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_deposits_total_values_order_by!]!, $where: leaderboard_operator_deposits_total_values_bool_exp) { + leaderboard_operator_deposits_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_deposits_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorDepositsTotalValueQuery__ + * + * To run a query within a React component, call `useOperatorDepositsTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorDepositsTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorDepositsTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorDepositsTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorDepositsTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorDepositsTotalValueDocument, options); + } +export function useOperatorDepositsTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorDepositsTotalValueDocument, options); + } +export function useOperatorDepositsTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorDepositsTotalValueDocument, options); + } +export type OperatorDepositsTotalValueQueryHookResult = ReturnType; +export type OperatorDepositsTotalValueLazyQueryHookResult = ReturnType; +export type OperatorDepositsTotalValueSuspenseQueryHookResult = ReturnType; +export type OperatorDepositsTotalValueQueryResult = Apollo.QueryResult; +export const OperatorWithdrawalsTotalCountDocument = gql` + query OperatorWithdrawalsTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_operator_withdrawals_total_counts_order_by!]!, $where: leaderboard_operator_withdrawals_total_counts_bool_exp) { + leaderboard_operator_withdrawals_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_operator_withdrawals_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorWithdrawalsTotalCountQuery__ + * + * To run a query within a React component, call `useOperatorWithdrawalsTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorWithdrawalsTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorWithdrawalsTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorWithdrawalsTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorWithdrawalsTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorWithdrawalsTotalCountDocument, options); + } +export function useOperatorWithdrawalsTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorWithdrawalsTotalCountDocument, options); + } +export function useOperatorWithdrawalsTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorWithdrawalsTotalCountDocument, options); + } +export type OperatorWithdrawalsTotalCountQueryHookResult = ReturnType; +export type OperatorWithdrawalsTotalCountLazyQueryHookResult = ReturnType; +export type OperatorWithdrawalsTotalCountSuspenseQueryHookResult = ReturnType; +export type OperatorWithdrawalsTotalCountQueryResult = Apollo.QueryResult; +export const NominatorDepositsTotalCountDocument = gql` + query NominatorDepositsTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_nominator_deposits_total_counts_order_by!]!, $where: leaderboard_nominator_deposits_total_counts_bool_exp) { + leaderboard_nominator_deposits_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_nominator_deposits_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useNominatorDepositsTotalCountQuery__ + * + * To run a query within a React component, call `useNominatorDepositsTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useNominatorDepositsTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useNominatorDepositsTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useNominatorDepositsTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: NominatorDepositsTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(NominatorDepositsTotalCountDocument, options); + } +export function useNominatorDepositsTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(NominatorDepositsTotalCountDocument, options); + } +export function useNominatorDepositsTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(NominatorDepositsTotalCountDocument, options); + } +export type NominatorDepositsTotalCountQueryHookResult = ReturnType; +export type NominatorDepositsTotalCountLazyQueryHookResult = ReturnType; +export type NominatorDepositsTotalCountSuspenseQueryHookResult = ReturnType; +export type NominatorDepositsTotalCountQueryResult = Apollo.QueryResult; +export const NominatorDepositsTotalValueDocument = gql` + query NominatorDepositsTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_nominator_deposits_total_values_order_by!]!, $where: leaderboard_nominator_deposits_total_values_bool_exp) { + leaderboard_nominator_deposits_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_nominator_deposits_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useNominatorDepositsTotalValueQuery__ + * + * To run a query within a React component, call `useNominatorDepositsTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useNominatorDepositsTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useNominatorDepositsTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useNominatorDepositsTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: NominatorDepositsTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(NominatorDepositsTotalValueDocument, options); + } +export function useNominatorDepositsTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(NominatorDepositsTotalValueDocument, options); + } +export function useNominatorDepositsTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(NominatorDepositsTotalValueDocument, options); + } +export type NominatorDepositsTotalValueQueryHookResult = ReturnType; +export type NominatorDepositsTotalValueLazyQueryHookResult = ReturnType; +export type NominatorDepositsTotalValueSuspenseQueryHookResult = ReturnType; +export type NominatorDepositsTotalValueQueryResult = Apollo.QueryResult; +export const NominatorWithdrawalsTotalCountDocument = gql` + query NominatorWithdrawalsTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_nominator_withdrawals_total_counts_order_by!]!, $where: leaderboard_nominator_withdrawals_total_counts_bool_exp) { + leaderboard_nominator_withdrawals_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_nominator_withdrawals_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useNominatorWithdrawalsTotalCountQuery__ + * + * To run a query within a React component, call `useNominatorWithdrawalsTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useNominatorWithdrawalsTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useNominatorWithdrawalsTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useNominatorWithdrawalsTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: NominatorWithdrawalsTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(NominatorWithdrawalsTotalCountDocument, options); + } +export function useNominatorWithdrawalsTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(NominatorWithdrawalsTotalCountDocument, options); + } +export function useNominatorWithdrawalsTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(NominatorWithdrawalsTotalCountDocument, options); + } +export type NominatorWithdrawalsTotalCountQueryHookResult = ReturnType; +export type NominatorWithdrawalsTotalCountLazyQueryHookResult = ReturnType; +export type NominatorWithdrawalsTotalCountSuspenseQueryHookResult = ReturnType; +export type NominatorWithdrawalsTotalCountQueryResult = Apollo.QueryResult; +export const FarmerVoteAndBlockTotalCountDocument = gql` + query FarmerVoteAndBlockTotalCount($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_vote_and_block_total_counts_order_by!]!, $where: leaderboard_farmer_vote_and_block_total_counts_bool_exp) { + leaderboard_farmer_vote_and_block_total_counts_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_vote_and_block_total_counts( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerVoteAndBlockTotalCountQuery__ + * + * To run a query within a React component, call `useFarmerVoteAndBlockTotalCountQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerVoteAndBlockTotalCountQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerVoteAndBlockTotalCountQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerVoteAndBlockTotalCountQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerVoteAndBlockTotalCountQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerVoteAndBlockTotalCountDocument, options); + } +export function useFarmerVoteAndBlockTotalCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerVoteAndBlockTotalCountDocument, options); + } +export function useFarmerVoteAndBlockTotalCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerVoteAndBlockTotalCountDocument, options); + } +export type FarmerVoteAndBlockTotalCountQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalCountLazyQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalCountSuspenseQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalCountQueryResult = Apollo.QueryResult; +export const FarmerVoteAndBlockTotalValueDocument = gql` + query FarmerVoteAndBlockTotalValue($limit: Int!, $offset: Int, $orderBy: [leaderboard_farmer_vote_and_block_total_values_order_by!]!, $where: leaderboard_farmer_vote_and_block_total_values_bool_exp) { + leaderboard_farmer_vote_and_block_total_values_aggregate(where: $where) { + aggregate { + count + } + } + leaderboard_farmer_vote_and_block_total_values( + limit: $limit + offset: $offset + order_by: $orderBy + where: $where + ) { + id + rank + value + lastContributionAt: last_contribution_at + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useFarmerVoteAndBlockTotalValueQuery__ + * + * To run a query within a React component, call `useFarmerVoteAndBlockTotalValueQuery` and pass it any options that fit your needs. + * When your component renders, `useFarmerVoteAndBlockTotalValueQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFarmerVoteAndBlockTotalValueQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useFarmerVoteAndBlockTotalValueQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FarmerVoteAndBlockTotalValueQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FarmerVoteAndBlockTotalValueDocument, options); + } +export function useFarmerVoteAndBlockTotalValueLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FarmerVoteAndBlockTotalValueDocument, options); + } +export function useFarmerVoteAndBlockTotalValueSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(FarmerVoteAndBlockTotalValueDocument, options); + } +export type FarmerVoteAndBlockTotalValueQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalValueLazyQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalValueSuspenseQueryHookResult = ReturnType; +export type FarmerVoteAndBlockTotalValueQueryResult = Apollo.QueryResult; +export const NominationsListDocument = gql` + query NominationsList($limit: Int!, $offset: Int, $orderBy: [staking_nominators_order_by!]!, $where: staking_nominators_bool_exp) { + staking_nominators_aggregate(where: $where) { + aggregate { + count + } + } + staking_nominators( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + account_id + domain_id + domain { + id + name + } + operator_id + operator { + id + account_id + status + pending_action + current_total_shares + } + known_shares + known_storage_fee_deposit + pending_amount + pending_storage_fee_deposit + pending_effective_domain_epoch + total_withdrawal_amounts + total_storage_fee_refund + unlock_at_confirmed_domain_block_number + pending_shares + pending_storage_fee_refund + total_deposits + status + pending_action + created_at + updated_at + deposits { + id + amount + storage_fee_deposit + timestamp + extrinsic_hash + status + created_at + staked_at + updated_at + } + withdrawals { + id + shares + estimated_amount + unlocked_amount + unlocked_storage_fee + timestamp + withdraw_extrinsic_hash + unlock_extrinsic_hash + status + created_at + ready_at + unlocked_at + updated_at + } + } +} + `; + +/** + * __useNominationsListQuery__ + * + * To run a query within a React component, call `useNominationsListQuery` and pass it any options that fit your needs. + * When your component renders, `useNominationsListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useNominationsListQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useNominationsListQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: NominationsListQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(NominationsListDocument, options); + } +export function useNominationsListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(NominationsListDocument, options); + } +export function useNominationsListSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(NominationsListDocument, options); + } +export type NominationsListQueryHookResult = ReturnType; +export type NominationsListLazyQueryHookResult = ReturnType; +export type NominationsListSuspenseQueryHookResult = ReturnType; +export type NominationsListQueryResult = Apollo.QueryResult; +export const OperatorsListDocument = gql` + query OperatorsList($limit: Int!, $offset: Int, $orderBy: [staking_operators_order_by!]!, $where: staking_operators_bool_exp) { + staking_operators_aggregate(where: $where) { + aggregate { + count + } + } + staking_operators( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + sortId: sort_id + accountId: account_id + domainId: domain_id + domain { + id + sort_id + last_domain_block_number + } + currentEpochRewards: current_epoch_rewards + currentTotalStake: current_total_stake + currentTotalShares: current_total_shares + currentSharePrice: current_share_price + currentStorageFeeDeposit: current_storage_fee_deposit + minimumNominatorStake: minimum_nominator_stake + nominationTax: nomination_tax + signingKey: signing_key + status + rawStatus: raw_status + pendingAction: pending_action + totalDeposits: total_deposits + totalEstimatedWithdrawals: total_estimated_withdrawals + totalWithdrawals: total_withdrawals + totalTaxCollected: total_tax_collected + totalRewardsCollected: total_rewards_collected + totalTransfersIn: total_transfers_in + transfersInCount: transfers_in_count + totalTransfersOut: total_transfers_out + transfersOutCount: transfers_out_count + totalRejectedTransfersClaimed: total_rejected_transfers_claimed + rejectedTransfersClaimedCount: rejected_transfers_claimed_count + totalTransfersRejected: total_transfers_rejected + transfersRejectedCount: transfers_rejected_count + totalVolume: total_volume + totalConsensusStorageFee: total_consensus_storage_fee + totalDomainExecutionFee: total_domain_execution_fee + totalBurnedBalance: total_burned_balance + accumulatedEpochShares: accumulated_epoch_shares + accumulatedEpochStorageFeeDeposit: accumulated_epoch_storage_fee_deposit + activeEpochCount: active_epoch_count + bundleCount: bundle_count + lastBundleAt: last_bundle_at + nominatorsAggregate: nominators_aggregate { + aggregate { + count + } + } + depositsAggregate: deposits_aggregate { + aggregate { + count + } + } + nominators(limit: 256) { + id + account_id + known_shares + unlock_at_confirmed_domain_block_number + } + createdAt: created_at + updatedAt: updated_at + } +} + `; + +/** + * __useOperatorsListQuery__ + * + * To run a query within a React component, call `useOperatorsListQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorsListQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorsListQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorsListQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorsListQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorsListDocument, options); + } +export function useOperatorsListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorsListDocument, options); + } +export function useOperatorsListSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorsListDocument, options); + } +export type OperatorsListQueryHookResult = ReturnType; +export type OperatorsListLazyQueryHookResult = ReturnType; +export type OperatorsListSuspenseQueryHookResult = ReturnType; +export type OperatorsListQueryResult = Apollo.QueryResult; +export const OperatorByIdDocument = gql` + query OperatorById($operatorId: String!) { + staking_operators_by_pk(id: $operatorId) { + id + account_id + domain_id + domain { + id + sort_id + } + bundle_count + current_epoch_rewards + current_total_stake + current_total_shares + current_share_price + current_storage_fee_deposit + minimum_nominator_stake + total_rewards_collected + total_consensus_storage_fee + total_domain_execution_fee + total_burned_balance + total_tax_collected + nomination_tax + signing_key + status + raw_status + pending_action + last_bundle_at + updated_at + nominators_aggregate { + aggregate { + count + } + } + deposits_aggregate { + aggregate { + count + } + } + withdrawals_aggregate { + aggregate { + count + } + } + } +} + `; + +/** + * __useOperatorByIdQuery__ + * + * To run a query within a React component, call `useOperatorByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorByIdQuery({ + * variables: { + * operatorId: // value for 'operatorId' + * }, + * }); + */ +export function useOperatorByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorByIdDocument, options); + } +export function useOperatorByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorByIdDocument, options); + } +export function useOperatorByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorByIdDocument, options); + } +export type OperatorByIdQueryHookResult = ReturnType; +export type OperatorByIdLazyQueryHookResult = ReturnType; +export type OperatorByIdSuspenseQueryHookResult = ReturnType; +export type OperatorByIdQueryResult = Apollo.QueryResult; +export const OperatorNominatorsByIdDocument = gql` + query OperatorNominatorsById($limit: Int!, $offset: Int, $orderBy: [staking_nominators_order_by!]!, $where: staking_nominators_bool_exp) { + staking_nominators_aggregate(where: $where) { + aggregate { + count + } + } + staking_nominators( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + known_shares + account_id + domain_id + } +} + `; + +/** + * __useOperatorNominatorsByIdQuery__ + * + * To run a query within a React component, call `useOperatorNominatorsByIdQuery` and pass it any options that fit your needs. + * When your component renders, `useOperatorNominatorsByIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useOperatorNominatorsByIdQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useOperatorNominatorsByIdQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: OperatorNominatorsByIdQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(OperatorNominatorsByIdDocument, options); + } +export function useOperatorNominatorsByIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(OperatorNominatorsByIdDocument, options); + } +export function useOperatorNominatorsByIdSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(OperatorNominatorsByIdDocument, options); + } +export type OperatorNominatorsByIdQueryHookResult = ReturnType; +export type OperatorNominatorsByIdLazyQueryHookResult = ReturnType; +export type OperatorNominatorsByIdSuspenseQueryHookResult = ReturnType; +export type OperatorNominatorsByIdQueryResult = Apollo.QueryResult; +export const NominatorsConnectionDocument = gql` + query NominatorsConnection($limit: Int!, $offset: Int, $orderBy: [staking_nominators_order_by!]!, $where: staking_nominators_bool_exp) { + staking_nominators_aggregate(where: $where) { + aggregate { + count + } + } + staking_nominators( + order_by: $orderBy + limit: $limit + offset: $offset + where: $where + ) { + id + known_shares + account_id + domain_id + operator { + id + account_id + domain_id + current_epoch_rewards + current_total_stake + current_total_shares + current_share_price + minimum_nominator_stake + nomination_tax + signing_key + status + raw_status + pending_action + updated_at + } + updated_at + } +} + `; + +/** + * __useNominatorsConnectionQuery__ + * + * To run a query within a React component, call `useNominatorsConnectionQuery` and pass it any options that fit your needs. + * When your component renders, `useNominatorsConnectionQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useNominatorsConnectionQuery({ + * variables: { + * limit: // value for 'limit' + * offset: // value for 'offset' + * orderBy: // value for 'orderBy' + * where: // value for 'where' + * }, + * }); + */ +export function useNominatorsConnectionQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: NominatorsConnectionQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(NominatorsConnectionDocument, options); + } +export function useNominatorsConnectionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(NominatorsConnectionDocument, options); + } +export function useNominatorsConnectionSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(NominatorsConnectionDocument, options); + } +export type NominatorsConnectionQueryHookResult = ReturnType; +export type NominatorsConnectionLazyQueryHookResult = ReturnType; +export type NominatorsConnectionSuspenseQueryHookResult = ReturnType; +export type NominatorsConnectionQueryResult = Apollo.QueryResult; +export const DomainsLastBlockDocument = gql` + query DomainsLastBlock { + staking_domains { + id + last_domain_block_number + completed_epoch + } +} + `; + +/** + * __useDomainsLastBlockQuery__ + * + * To run a query within a React component, call `useDomainsLastBlockQuery` and pass it any options that fit your needs. + * When your component renders, `useDomainsLastBlockQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useDomainsLastBlockQuery({ + * variables: { + * }, + * }); + */ +export function useDomainsLastBlockQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(DomainsLastBlockDocument, options); + } +export function useDomainsLastBlockLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(DomainsLastBlockDocument, options); + } +export function useDomainsLastBlockSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(DomainsLastBlockDocument, options); + } +export type DomainsLastBlockQueryHookResult = ReturnType; +export type DomainsLastBlockLazyQueryHookResult = ReturnType; +export type DomainsLastBlockSuspenseQueryHookResult = ReturnType; +export type DomainsLastBlockQueryResult = Apollo.QueryResult; +export const AccountsTopLeaderboardDocument = gql` + query AccountsTopLeaderboard($first: Int!) { + farmers: consensus_rewards( + order_by: {amount: desc} + limit: $first + where: {_or: [{reward_type: {_eq: "Rewards.VoteReward"}}, {reward_type: {_eq: "Rewards.BlockReward"}}]} + ) { + id + } + operators: consensus_rewards( + order_by: {amount: desc} + limit: $first + where: {_or: [{reward_type: {_eq: "Rewards.VoteReward"}}, {reward_type: {_eq: "Rewards.BlockReward"}}]} + ) { + id + } + nominators: consensus_rewards( + order_by: {amount: desc} + limit: $first + where: {_or: [{reward_type: {_eq: "Rewards.VoteReward"}}, {reward_type: {_eq: "Rewards.BlockReward"}}]} + ) { + id + } +} + `; + +/** + * __useAccountsTopLeaderboardQuery__ + * + * To run a query within a React component, call `useAccountsTopLeaderboardQuery` and pass it any options that fit your needs. + * When your component renders, `useAccountsTopLeaderboardQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useAccountsTopLeaderboardQuery({ + * variables: { + * first: // value for 'first' + * }, + * }); + */ +export function useAccountsTopLeaderboardQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: AccountsTopLeaderboardQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AccountsTopLeaderboardDocument, options); + } +export function useAccountsTopLeaderboardLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AccountsTopLeaderboardDocument, options); + } +export function useAccountsTopLeaderboardSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(AccountsTopLeaderboardDocument, options); + } +export type AccountsTopLeaderboardQueryHookResult = ReturnType; +export type AccountsTopLeaderboardLazyQueryHookResult = ReturnType; +export type AccountsTopLeaderboardSuspenseQueryHookResult = ReturnType; +export type AccountsTopLeaderboardQueryResult = Apollo.QueryResult; +export const PendingTransactionDocument = gql` + query PendingTransaction($subspaceAccount: String, $extrinsics: [String!]) { + consensus_accounts(where: {id: {_eq: $subspaceAccount}}) { + id + extrinsics(where: {hash: {_in: $extrinsics}}) { + hash + success + timestamp + name + events(limit: 1, order_by: {id: desc}) { + name + } + block { + hash + height + id + } + } + } +} + `; + +/** + * __usePendingTransactionQuery__ + * + * To run a query within a React component, call `usePendingTransactionQuery` and pass it any options that fit your needs. + * When your component renders, `usePendingTransactionQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = usePendingTransactionQuery({ + * variables: { + * subspaceAccount: // value for 'subspaceAccount' + * extrinsics: // value for 'extrinsics' + * }, + * }); + */ +export function usePendingTransactionQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(PendingTransactionDocument, options); + } +export function usePendingTransactionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(PendingTransactionDocument, options); + } +export function usePendingTransactionSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(PendingTransactionDocument, options); + } +export type PendingTransactionQueryHookResult = ReturnType; +export type PendingTransactionLazyQueryHookResult = ReturnType; +export type PendingTransactionSuspenseQueryHookResult = ReturnType; +export type PendingTransactionQueryResult = Apollo.QueryResult; +export const ExtrinsicsSummaryDocument = gql` + query ExtrinsicsSummary($first: Int!, $subspaceAccount: String) { + consensus_extrinsics_aggregate(where: {signer: {_eq: $subspaceAccount}}) { + aggregate { + count + } + } + extrinsics: consensus_extrinsics( + order_by: {id: desc} + limit: $first + where: {signer: {_eq: $subspaceAccount}} + ) { + id + hash + success + timestamp + block_height + name + } +} + `; + +/** + * __useExtrinsicsSummaryQuery__ + * + * To run a query within a React component, call `useExtrinsicsSummaryQuery` and pass it any options that fit your needs. + * When your component renders, `useExtrinsicsSummaryQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useExtrinsicsSummaryQuery({ + * variables: { + * first: // value for 'first' + * subspaceAccount: // value for 'subspaceAccount' + * }, + * }); + */ +export function useExtrinsicsSummaryQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: ExtrinsicsSummaryQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(ExtrinsicsSummaryDocument, options); + } +export function useExtrinsicsSummaryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(ExtrinsicsSummaryDocument, options); + } +export function useExtrinsicsSummarySuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(ExtrinsicsSummaryDocument, options); + } +export type ExtrinsicsSummaryQueryHookResult = ReturnType; +export type ExtrinsicsSummaryLazyQueryHookResult = ReturnType; +export type ExtrinsicsSummarySuspenseQueryHookResult = ReturnType; +export type ExtrinsicsSummaryQueryResult = Apollo.QueryResult; +export const CheckRoleDocument = gql` + query CheckRole($subspaceAccount: String!) { + isFarmer: consensus_rewards( + where: {_or: [{reward_type: {_eq: "Rewards.VoteReward"}}, {reward_type: {_eq: "Rewards.BlockReward"}}], account_id: {_eq: $subspaceAccount}} + limit: 1 + ) { + account { + id + } + } +} + `; + +/** + * __useCheckRoleQuery__ + * + * To run a query within a React component, call `useCheckRoleQuery` and pass it any options that fit your needs. + * When your component renders, `useCheckRoleQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useCheckRoleQuery({ + * variables: { + * subspaceAccount: // value for 'subspaceAccount' + * }, + * }); + */ +export function useCheckRoleQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: CheckRoleQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(CheckRoleDocument, options); + } +export function useCheckRoleLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(CheckRoleDocument, options); + } +export function useCheckRoleSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(CheckRoleDocument, options); + } +export type CheckRoleQueryHookResult = ReturnType; +export type CheckRoleLazyQueryHookResult = ReturnType; +export type CheckRoleSuspenseQueryHookResult = ReturnType; +export type CheckRoleQueryResult = Apollo.QueryResult; +export const StakingSummaryDocument = gql` + query StakingSummary($first: Int!, $subspaceAccount: String) { + staking_operators( + order_by: {id: asc} + limit: $first + where: {account_id: {_eq: $subspaceAccount}} + ) { + id + account_id + domain_id + current_total_stake + current_total_shares + } + staking_operators_aggregate( + order_by: {id: asc} + where: {account_id: {_eq: $subspaceAccount}} + ) { + aggregate { + count + } + } + staking_nominators( + order_by: {id: asc} + limit: $first + where: {account_id: {_eq: $subspaceAccount}} + ) { + id + known_shares + known_storage_fee_deposit + account { + id + } + operator { + id + account_id + domain_id + current_total_stake + current_total_shares + } + } + staking_nominators_aggregate( + order_by: {id: asc} + where: {account_id: {_eq: $subspaceAccount}} + ) { + aggregate { + count + } + } +} + `; + +/** + * __useStakingSummaryQuery__ + * + * To run a query within a React component, call `useStakingSummaryQuery` and pass it any options that fit your needs. + * When your component renders, `useStakingSummaryQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useStakingSummaryQuery({ + * variables: { + * first: // value for 'first' + * subspaceAccount: // value for 'subspaceAccount' + * }, + * }); + */ +export function useStakingSummaryQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: StakingSummaryQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(StakingSummaryDocument, options); + } +export function useStakingSummaryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(StakingSummaryDocument, options); + } +export function useStakingSummarySuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(StakingSummaryDocument, options); + } +export type StakingSummaryQueryHookResult = ReturnType; +export type StakingSummaryLazyQueryHookResult = ReturnType; +export type StakingSummarySuspenseQueryHookResult = ReturnType; +export type StakingSummaryQueryResult = Apollo.QueryResult; +export const LastBlockDocument = gql` + query LastBlock { + lastBlock: consensus_blocks(limit: 1, order_by: {sort_id: desc}) { + height + } +} + `; + +/** + * __useLastBlockQuery__ + * + * To run a query within a React component, call `useLastBlockQuery` and pass it any options that fit your needs. + * When your component renders, `useLastBlockQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useLastBlockQuery({ + * variables: { + * }, + * }); + */ +export function useLastBlockQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(LastBlockDocument, options); + } +export function useLastBlockLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(LastBlockDocument, options); + } +export function useLastBlockSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions) { + const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery(LastBlockDocument, options); + } +export type LastBlockQueryHookResult = ReturnType; +export type LastBlockLazyQueryHookResult = ReturnType; +export type LastBlockSuspenseQueryHookResult = ReturnType; +export type LastBlockQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/explorer/package.json b/explorer/package.json index 14b411d3d..2a6755351 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -29,8 +29,8 @@ "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc" }, "dependencies": { - "@apollo/client": "^3.7.0", - "@apollo/experimental-nextjs-app-support": "^0.8.0", + "@apollo/client": "^3.10.4", + "@apollo/experimental-nextjs-app-support": "^0.11.6", "@autonomys/auto-consensus": "^1.0.10", "@autonomys/auto-utils": "^1.0.10", "@headlessui/react": "^1.7.18", @@ -56,6 +56,7 @@ "faunadb": "^4.8.0", "formik": "^2.4.5", "graphql": "^16.6.0", + "graphql-ws": "^5.16.0", "jsonwebtoken": "^9.0.2", "lodash": "^4.17.21", "lottie-react": "^2.4.0", @@ -84,7 +85,8 @@ "devDependencies": { "@discordjs/rest": "^2.2.0", "@graphql-codegen/cli": "^4.0.1", - "@graphql-codegen/client-preset": "4.0.0", + "@graphql-codegen/client-preset": "^4.5.1", + "@graphql-codegen/typescript-react-apollo": "^4.3.2", "@next/eslint-plugin-next": "^14.1.3", "@svgr/webpack": "^8.1.0", "@types/jest": "^29.5.12", diff --git a/explorer/src/app/[chain]/consensus/image/route.tsx b/explorer/src/app/[chain]/consensus/image/route.tsx index e99ea90c1..acaca4998 100644 --- a/explorer/src/app/[chain]/consensus/image/route.tsx +++ b/explorer/src/app/[chain]/consensus/image/route.tsx @@ -55,7 +55,7 @@ function Screen({ }) { const block = { height: data.consensus_blocks[0]?.height ?? '0', - timestamp: data.consensus_blocks[0]?.state_root ?? '0', + timestamp: data.consensus_blocks[0]?.timestamp ?? '0', extrinsicsCount: data.consensus_extrinsics_aggregate.aggregate?.count ?? 0, spacePledged: data.consensus_blocks[0]?.space_pledged ?? '', historySize: data.consensus_blocks[0]?.blockchain_size ?? '', diff --git a/explorer/src/components/Consensus/Home/HomeBlockList.tsx b/explorer/src/components/Consensus/Home/HomeBlockList.tsx index 915fffb29..3aee43d22 100644 --- a/explorer/src/components/Consensus/Home/HomeBlockList.tsx +++ b/explorer/src/components/Consensus/Home/HomeBlockList.tsx @@ -1,25 +1,31 @@ 'use client' +import { Spinner } from '@/components/common/Spinner' +import { NotFound } from '@/components/layout/NotFound' +import { PAGE_SIZE } from '@/constants/general' import { ArrowLongRightIcon } from '@heroicons/react/24/outline' import { SortedTable } from 'components/common/SortedTable' import { INTERNAL_ROUTES } from 'constants/routes' -import { HomeQueryQuery } from 'gql/graphql' +import { + HomeSubscriptionBlocksListSubscription, + useHomeSubscriptionBlocksListSubscription, +} from 'gql/graphql' import useIndexers from 'hooks/useIndexers' import Link from 'next/link' import { FC, useMemo } from 'react' import type { Cell } from 'types/table' import { utcToLocalRelativeTime } from 'utils/time' -interface HomeBlockListProps { - data: HomeQueryQuery -} - -type Row = HomeQueryQuery['consensus_blocks'][number] +type Row = HomeSubscriptionBlocksListSubscription['consensus_blocks'][number] -export const HomeBlockList: FC = ({ data }) => { +export const HomeBlockList: FC = () => { const { network, section } = useIndexers() - const blocks = useMemo(() => data.consensus_blocks, [data.consensus_blocks]) + const { loading, data, error } = useHomeSubscriptionBlocksListSubscription({ + variables: { limit: PAGE_SIZE, offset: 0 }, + }) + + const blocks = useMemo(() => data?.consensus_blocks, [data?.consensus_blocks]) const columns = useMemo( () => [ @@ -63,6 +69,12 @@ export const HomeBlockList: FC = ({ data }) => { [network, section], ) + const noData = useMemo(() => { + if (loading) return + if (!blocks || error) return + return null + }, [blocks, loading, error]) + return (
@@ -77,13 +89,17 @@ export const HomeBlockList: FC = ({ data }) => {
- + {noData || !blocks ? ( + noData + ) : ( + + )}
) } diff --git a/explorer/src/components/Consensus/Home/HomeCards.tsx b/explorer/src/components/Consensus/Home/HomeCards.tsx index 0533f85fe..9a1d75a0f 100644 --- a/explorer/src/components/Consensus/Home/HomeCards.tsx +++ b/explorer/src/components/Consensus/Home/HomeCards.tsx @@ -5,9 +5,7 @@ import { HomeInfoCard } from './HomeInfoCard' type Props = { blocksCount?: string extrinsicsCount?: string - signedExtrinsicsCount?: string accountsCount?: string - accountsWithBalanceCount?: string spacePledged?: string spacePledgedBinary?: string historySize?: string @@ -17,9 +15,7 @@ type Props = { export const HomeCards: FC = ({ blocksCount = '0', extrinsicsCount = '0', - signedExtrinsicsCount = '0', accountsCount = '0', - accountsWithBalanceCount = '0', spacePledged = '0', spacePledgedBinary = '0', historySize = '0', @@ -38,14 +34,12 @@ export const HomeCards: FC = ({ title: 'Extrinsics', icon: , value: extrinsicsCount, - tooltip:

{signedExtrinsicsCount} signed

, darkBgClass: 'dark:bg-gradient-to-b dark:from-purpleUndertone dark:to-pastelBlue', }, { title: 'Wallet addresses', icon: , value: accountsCount, - tooltip:

{accountsWithBalanceCount} >= 1

, darkBgClass: 'dark:bg-gradient-to-b dark:from-pastelPurple dark:to-pastelPink', }, { @@ -69,8 +63,6 @@ export const HomeCards: FC = ({ historySize, accountsCount, extrinsicsCount, - signedExtrinsicsCount, - accountsWithBalanceCount, spacePledged, spacePledgedBinary, historySizeBinary, diff --git a/explorer/src/components/Consensus/Home/HomeChainInfo.tsx b/explorer/src/components/Consensus/Home/HomeChainInfo.tsx index 4f31dec02..677462680 100644 --- a/explorer/src/components/Consensus/Home/HomeChainInfo.tsx +++ b/explorer/src/components/Consensus/Home/HomeChainInfo.tsx @@ -23,22 +23,16 @@ export const HomeChainInfo: FC = ({ data }) => { const accountsCount = numberWithCommas( Number(data.consensus_accounts_aggregate?.aggregate?.count), ) - const accountsWithBalanceCount = numberWithCommas( - Number(data.accountsWithBalanceCount?.aggregate?.count), - ) const extrinsicsCount = numberWithCommas( Number(data.consensus_extrinsics_aggregate?.aggregate?.count), ) - const signedExtrinsicsCount = numberWithCommas(Number(data.signedExtrinsics?.aggregate?.count)) const blocksCount = numberWithCommas(Number(block.height)) return ( = ({ data }) => { +export const HomeExtrinsicList: FC = () => { const { network, section } = useIndexers() - const extrinsics = useMemo(() => data.consensus_extrinsics, [data.consensus_extrinsics]) + const { loading, data, error } = useHomeSubscriptionExtrinsicsListSubscription({ + variables: { limit: PAGE_SIZE, offset: 0 }, + }) + + const extrinsics = useMemo(() => data?.consensus_extrinsics, [data?.consensus_extrinsics]) const columns = useMemo( () => [ @@ -79,6 +85,12 @@ export const HomeExtrinsicList: FC = ({ data }) => { [network, section], ) + const noData = useMemo(() => { + if (loading) return + if (!extrinsics || error) return + return null + }, [extrinsics, loading, error]) + return (
@@ -93,13 +105,17 @@ export const HomeExtrinsicList: FC = ({ data }) => {
- + {noData || !extrinsics ? ( + noData + ) : ( + + )}
) } diff --git a/explorer/src/components/Consensus/Home/index.tsx b/explorer/src/components/Consensus/Home/index.tsx index f758d6edf..dc0f84e18 100644 --- a/explorer/src/components/Consensus/Home/index.tsx +++ b/explorer/src/components/Consensus/Home/index.tsx @@ -5,7 +5,6 @@ import { Spinner } from 'components/common/Spinner' import { Routes } from 'constants/routes' import type { HomeQueryQuery, HomeQueryQueryVariables } from 'gql/graphql' import { useIndexersQuery } from 'hooks/useIndexersQuery' -import useMediaQuery from 'hooks/useMediaQuery' import { FC, useEffect, useMemo } from 'react' import { useInView } from 'react-intersection-observer' import { hasValue, isLoading, useQueryStates } from 'states/query' @@ -17,13 +16,10 @@ import { QUERY_HOME } from './query' export const Home: FC = () => { const { ref, inView } = useInView() - const isDesktop = useMediaQuery('(min-width: 640px)') - const PAGE_SIZE = useMemo(() => (isDesktop ? 10 : 3), [isDesktop]) const { loading, setIsVisible } = useIndexersQuery( QUERY_HOME, { - variables: { limit: PAGE_SIZE, offset: 0 }, pollInterval: 6000, }, Routes.consensus, @@ -54,8 +50,8 @@ export const Home: FC = () => { <>
- - + +
) : ( diff --git a/explorer/src/components/Consensus/Home/query.ts b/explorer/src/components/Consensus/Home/query.ts index 83247a29d..17636792d 100644 --- a/explorer/src/components/Consensus/Home/query.ts +++ b/explorer/src/components/Consensus/Home/query.ts @@ -1,7 +1,28 @@ import { gql } from '@apollo/client' export const QUERY_HOME = gql` - query HomeQuery($limit: Int!, $offset: Int!) { + query HomeQuery { + consensus_blocks(limit: 1, order_by: { sort_id: desc }) { + height + timestamp + space_pledged + blockchain_size + } + consensus_accounts_aggregate { + aggregate { + count + } + } + consensus_extrinsics_aggregate { + aggregate { + count + } + } + } +` + +export const QUERY_HOME_BLOCKS_LIST = gql` + subscription HomeSubscriptionBlocksList($limit: Int!, $offset: Int!) { consensus_blocks(limit: $limit, offset: $offset, order_by: { sort_id: desc }) { id hash @@ -13,6 +34,11 @@ export const QUERY_HOME = gql` extrinsics_count events_count } + } +` + +export const QUERY_HOME_EXTRINSICS_LIST = gql` + subscription HomeSubscriptionExtrinsicsList($limit: Int!, $offset: Int!) { consensus_extrinsics(limit: $limit, offset: $offset, order_by: { timestamp: desc }) { hash id @@ -22,31 +48,5 @@ export const QUERY_HOME = gql` block_height name } - consensus_accounts_aggregate { - aggregate { - count - } - } - accountsWithBalanceCount: consensus_accounts_aggregate(where: { total: { _gt: 1 } }) { - aggregate { - count - } - } - consensus_extrinsics_aggregate { - aggregate { - count - } - } - signedExtrinsics: consensus_extrinsics_aggregate( - where: { - signature: { - _neq: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - } - ) { - aggregate { - count - } - } } ` diff --git a/explorer/src/providers/IndexersProvider.tsx b/explorer/src/providers/IndexersProvider.tsx index f41d021e6..30dd3ec29 100644 --- a/explorer/src/providers/IndexersProvider.tsx +++ b/explorer/src/providers/IndexersProvider.tsx @@ -1,19 +1,21 @@ 'use client' +import { createHttpLink, from, split } from '@apollo/client' +import { onError } from '@apollo/client/link/error' +import { RetryLink } from '@apollo/client/link/retry' +import { GraphQLWsLink } from '@apollo/client/link/subscriptions' +import { getMainDefinition } from '@apollo/client/utilities' import { ApolloClient, - ApolloLink, - ApolloProvider, + ApolloNextAppProvider, InMemoryCache, - createHttpLink, -} from '@apollo/client' -import { onError } from '@apollo/client/link/error' -import { RetryLink } from '@apollo/client/link/retry' +} from '@apollo/experimental-nextjs-app-support' import { NetworkId } from '@autonomys/auto-utils' import { Indexer, defaultIndexer } from 'constants/indexers' import { Routes } from 'constants/routes' +import { createClient } from 'graphql-ws' import { usePathname } from 'next/navigation' -import { FC, ReactNode, createContext, useCallback, useMemo, useState } from 'react' +import { FC, ReactNode, createContext, useCallback, useState } from 'react' import { logError } from 'utils/log' import { getTokenDecimals, getTokenSymbol } from 'utils/network' @@ -44,12 +46,28 @@ export const IndexersProvider: FC = ({ children }) => { uri: () => indexerSet.indexer, }) - const errorLink = onError(({ graphQLErrors, networkError }) => { + const wsLink = + typeof window !== 'undefined' + ? new GraphQLWsLink( + createClient({ + url: indexerSet.indexer.replace('http', 'ws'), + // TODO: might need to + retryAttempts: Infinity, + shouldRetry: () => true, + keepAlive: 10000, + }), + ) + : null + + const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => { + console.log('graphQLErrors', graphQLErrors) + console.log('networkError', networkError) + console.log('operation', operation) if (graphQLErrors) graphQLErrors.forEach(({ message, locations, path }) => logError( pathname, - `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}, [Network]: ${indexerSet.network}, [Section]: ${section}`, + `[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}, [Network]: ${indexerSet.network}, [Section]: ${section}, [Operation]: ${operation.operationName}`, ), ) if (networkError) @@ -57,31 +75,40 @@ export const IndexersProvider: FC = ({ children }) => { pathname, `[Network error]: ${networkError}, [Network]: ${indexerSet.network}, [Section]: ${section}`, ) + return forward(operation) }) - const link = ApolloLink.from([errorLink, new RetryLink(), httpLink]) - - const client = useMemo( - () => - new ApolloClient({ - link, - cache: new InMemoryCache(), - defaultOptions: { - watchQuery: { - fetchPolicy: 'cache-and-network', - errorPolicy: 'all', + const link = + typeof window !== 'undefined' && wsLink != null + ? split( + ({ query }) => { + const definition = getMainDefinition(query) + return ( + definition.kind === 'OperationDefinition' && definition.operation === 'subscription' + ) }, - query: { - fetchPolicy: 'network-only', - errorPolicy: 'all', - }, - mutate: { - errorPolicy: 'all', - }, - }, - }), - [link], - ) + split(({ query }) => getMainDefinition(query).name?.kind === 'Name', wsLink), + httpLink, + ) + : httpLink + + const client = new ApolloClient({ + link: from([errorLink, new RetryLink(), link]), + cache: new InMemoryCache(), + defaultOptions: { + watchQuery: { + fetchPolicy: 'cache-and-network', + errorPolicy: 'all', + }, + query: { + fetchPolicy: 'network-only', + errorPolicy: 'all', + }, + mutate: { + errorPolicy: 'all', + }, + }, + }) const setIndexerSet = useCallback( (indexer: Indexer) => { @@ -102,7 +129,7 @@ export const IndexersProvider: FC = ({ children }) => { setSection, }} > - {children} + client}>{children} ) } diff --git a/explorer/yarn.lock b/explorer/yarn.lock index 19e6ba113..9d0851af8 100644 --- a/explorer/yarn.lock +++ b/explorer/yarn.lock @@ -39,10 +39,17 @@ jsonpointer "^5.0.0" leven "^3.1.0" -"@apollo/client@^3.7.0": - version "3.9.6" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.6.tgz#4292448d9b0a48244a60307b74d2fea7e83dfe70" - integrity sha512-+zpddcnZ4G2VZ0xIEnvIHFsLqeopNOnWuE2ZVbRuetLLpj/biLPNN719B/iofdd1/iHRclKfv0XaAmX6PBhYKA== +"@apollo/client-react-streaming@0.11.6": + version "0.11.6" + resolved "https://registry.yarnpkg.com/@apollo/client-react-streaming/-/client-react-streaming-0.11.6.tgz#357f2e1b471c8b6055472164a297d177f2dd3f00" + integrity sha512-A1yQCV6+3SHNoqNa4G98qUQ6LZOOVlUE71tXbgArPKXyycVuP0CUJDWwULL5aoqY/HL4SyEWm/0MZaVO0j8aTw== + dependencies: + ts-invariant "^0.10.3" + +"@apollo/client@^3.10.4": + version "3.11.10" + resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.11.10.tgz#e16ae82ea9b16536ffd109847d24f9293fab5c4d" + integrity sha512-IfGc+X4il0rDqVQBBWdxIKM+ciDCiDzBq9+Bg9z4tJMi87uF6po4v+ddiac1wP0ARgVPsFwEIGxK7jhN4pW8jg== dependencies: "@graphql-typed-document-node/core" "^3.1.1" "@wry/caches" "^1.0.0" @@ -52,21 +59,19 @@ hoist-non-react-statics "^3.3.2" optimism "^0.18.0" prop-types "^15.7.2" - rehackt "0.0.6" + rehackt "^0.1.0" response-iterator "^0.2.6" symbol-observable "^4.0.0" ts-invariant "^0.10.3" tslib "^2.3.0" zen-observable-ts "^1.2.5" -"@apollo/experimental-nextjs-app-support@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@apollo/experimental-nextjs-app-support/-/experimental-nextjs-app-support-0.8.0.tgz#7c6627195d1895bd7698b29174afe85dc9013ddf" - integrity sha512-uyNIkOkew0T6ukC8ycbWBeTu8gtDSD5i+NVGEHU0DIEQaToFHObYcvIxaQ/8hvWzgvnpNU/KMsApfGXA9Xkpyw== +"@apollo/experimental-nextjs-app-support@^0.11.6": + version "0.11.6" + resolved "https://registry.yarnpkg.com/@apollo/experimental-nextjs-app-support/-/experimental-nextjs-app-support-0.11.6.tgz#52e6629f668c83ef2f83ad45334adceecc313971" + integrity sha512-ryJaZ8u0bl6IzDYhMlEVN2GVZlDB8DVLmAqrBk02rJo/v8iTA+HSrYz7VRnLEVF/VgmXKZRX16mkkRSHIxp2+A== dependencies: - server-only "^0.0.1" - superjson "^1.12.2 || ^2.0.0" - ts-invariant "^0.10.3" + "@apollo/client-react-streaming" "0.11.6" "@ardatan/relay-compiler@12.0.0": version "12.0.0" @@ -1264,10 +1269,10 @@ resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== -"@graphql-codegen/add@^5.0.0": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@graphql-codegen/add/-/add-5.0.2.tgz#71b3ae0465a4537172dddb84531b6967ca5545f2" - integrity sha512-ouBkSvMFUhda5VoKumo/ZvsZM9P5ZTyDsI8LW18VxSNWOjrTeLXBWHG8Gfaai0HwhflPtCYVABbriEcOmrRShQ== +"@graphql-codegen/add@^5.0.3": + version "5.0.3" + resolved "https://registry.yarnpkg.com/@graphql-codegen/add/-/add-5.0.3.tgz#1ede6bac9a93661ed7fa5808b203d079e1b1d215" + integrity sha512-SxXPmramkth8XtBlAHu4H4jYcYXM/o3p01+psU+0NADQowA8jtYkK6MW5rV6T+CxkEaNZItfSmZRPgIuypcqnA== dependencies: "@graphql-codegen/plugin-helpers" "^5.0.3" tslib "~2.6.0" @@ -1313,24 +1318,24 @@ yaml "^1.10.0" yargs "^17.0.0" -"@graphql-codegen/client-preset@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/client-preset/-/client-preset-4.0.0.tgz#4c271d2abadfba6cdfdb82127b8730f270f38295" - integrity sha512-A96Vc+ZHMoBTO7bH/I/iIqCBsDiXblKqhyMQsSfq79Muvtmhjx4E9Xt4s++/zpBbe4M+46EYLlde2ZIrymSqDw== +"@graphql-codegen/client-preset@^4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/client-preset/-/client-preset-4.5.1.tgz#7cb6405e26a73f67e88aa1815e28dfd3e28f2fad" + integrity sha512-UE2/Kz2eaxv35HIXFwlm2QwoUH77am6+qp54aeEWYq+T+WPwmIc6+YzqtGiT/VcaXgoOUSgidREGm9R6jKcf9g== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/template" "^7.20.7" - "@graphql-codegen/add" "^5.0.0" - "@graphql-codegen/gql-tag-operations" "4.0.0" - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/typed-document-node" "^5.0.0" - "@graphql-codegen/typescript" "^4.0.0" - "@graphql-codegen/typescript-operations" "^4.0.0" - "@graphql-codegen/visitor-plugin-common" "^4.0.0" + "@graphql-codegen/add" "^5.0.3" + "@graphql-codegen/gql-tag-operations" "4.0.12" + "@graphql-codegen/plugin-helpers" "^5.1.0" + "@graphql-codegen/typed-document-node" "^5.0.12" + "@graphql-codegen/typescript" "^4.1.2" + "@graphql-codegen/typescript-operations" "^4.4.0" + "@graphql-codegen/visitor-plugin-common" "^5.6.0" "@graphql-tools/documents" "^1.0.0" "@graphql-tools/utils" "^10.0.0" "@graphql-typed-document-node/core" "3.2.0" - tslib "~2.5.0" + tslib "~2.6.0" "@graphql-codegen/core@^4.0.0": version "4.0.2" @@ -1342,16 +1347,40 @@ "@graphql-tools/utils" "^10.0.0" tslib "~2.6.0" -"@graphql-codegen/gql-tag-operations@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.0.tgz#1d712c40a2f83e02867e536709c042c20ce0e79a" - integrity sha512-LLbyxjdtK5e78xmcQiy4aXzsttR+3VE8EsiGy9++ih8/JGsqxMcXEy4MtsVGh8KGdP+LCR+jA1o6grzm2tI3cw== +"@graphql-codegen/gql-tag-operations@4.0.12": + version "4.0.12" + resolved "https://registry.yarnpkg.com/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.12.tgz#99d5231f0f21cc44c9ed5efb3cccfd193f7f884f" + integrity sha512-v279i49FJ5dMmQXIGUgm6FtnnkxtJjVJWDNYh9JK4ppvOixdHp+PmEzW227DkLN6avhVxNnYdp/1gdRBwdWypw== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-codegen/visitor-plugin-common" "4.0.0" + "@graphql-codegen/plugin-helpers" "^5.1.0" + "@graphql-codegen/visitor-plugin-common" "5.6.0" "@graphql-tools/utils" "^10.0.0" auto-bind "~4.0.0" - tslib "~2.5.0" + tslib "~2.6.0" + +"@graphql-codegen/plugin-helpers@^2.7.2": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz#6544f739d725441c826a8af6a49519f588ff9bed" + integrity sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg== + dependencies: + "@graphql-tools/utils" "^8.8.0" + change-case-all "1.0.14" + common-tags "1.8.2" + import-from "4.0.0" + lodash "~4.17.0" + tslib "~2.4.0" + +"@graphql-codegen/plugin-helpers@^3.0.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz#69a2e91178f478ea6849846ade0a59a844d34389" + integrity sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg== + dependencies: + "@graphql-tools/utils" "^9.0.0" + change-case-all "1.0.15" + common-tags "1.8.2" + import-from "4.0.0" + lodash "~4.17.0" + tslib "~2.4.0" "@graphql-codegen/plugin-helpers@^5.0.0", "@graphql-codegen/plugin-helpers@^5.0.3": version "5.0.3" @@ -1365,6 +1394,18 @@ lodash "~4.17.0" tslib "~2.6.0" +"@graphql-codegen/plugin-helpers@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.1.0.tgz#5c4ace748b9761d082ec1a0c19a82047bacce553" + integrity sha512-Y7cwEAkprbTKzVIe436TIw4w03jorsMruvCvu0HJkavaKMQbWY+lQ1RIuROgszDbxAyM35twB5/sUvYG5oW+yg== + dependencies: + "@graphql-tools/utils" "^10.0.0" + change-case-all "1.0.15" + common-tags "1.8.2" + import-from "4.0.0" + lodash "~4.17.0" + tslib "~2.6.0" + "@graphql-codegen/schema-ast@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@graphql-codegen/schema-ast/-/schema-ast-4.0.2.tgz#aeaa104e4555cca73a058f0a9350b4b0e290b377" @@ -1374,77 +1415,72 @@ "@graphql-tools/utils" "^10.0.0" tslib "~2.6.0" -"@graphql-codegen/typed-document-node@^5.0.0": - version "5.0.6" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.6.tgz#54750f4a7c6e963defeb6c27a9ea280a2a8bc2a3" - integrity sha512-US0J95hOE2/W/h42w4oiY+DFKG7IetEN1mQMgXXeat1w6FAR5PlIz4JrRrEkiVfVetZ1g7K78SOwBD8/IJnDiA== +"@graphql-codegen/typed-document-node@^5.0.12": + version "5.0.12" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typed-document-node/-/typed-document-node-5.0.12.tgz#d260586a9094066215fafa2bbc34fd1848665aaa" + integrity sha512-Wsbc1AqC+MFp3maWPzrmmyHLuWCPB63qBBFLTKtO6KSsnn0KnLocBp475wkfBZnFISFvzwpJ0e6LV71gKfTofQ== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" - "@graphql-codegen/visitor-plugin-common" "5.1.0" + "@graphql-codegen/plugin-helpers" "^5.1.0" + "@graphql-codegen/visitor-plugin-common" "5.6.0" auto-bind "~4.0.0" change-case-all "1.0.15" tslib "~2.6.0" -"@graphql-codegen/typescript-operations@^4.0.0": - version "4.2.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-4.2.0.tgz#0c6bbaf41cb325809b7e9e2b9d85ab01f11d142f" - integrity sha512-lmuwYb03XC7LNRS8oo9M4/vlOrq/wOKmTLBHlltK2YJ1BO/4K/Q9Jdv/jDmJpNydHVR1fmeF4wAfsIp1f9JibA== +"@graphql-codegen/typescript-operations@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-operations/-/typescript-operations-4.4.0.tgz#d614294760cda1955aff69063dcb2f466c63d248" + integrity sha512-oVlos2ySx8xIbbe8r5ZI6mOpI+OTeP14RmS2MchBJ6DL+S9G16O6+9V3Y8V22fTnmBTZkTfAAaBv4HYhhDGWVA== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" - "@graphql-codegen/typescript" "^4.0.6" - "@graphql-codegen/visitor-plugin-common" "5.1.0" + "@graphql-codegen/plugin-helpers" "^5.1.0" + "@graphql-codegen/typescript" "^4.1.2" + "@graphql-codegen/visitor-plugin-common" "5.6.0" auto-bind "~4.0.0" tslib "~2.6.0" -"@graphql-codegen/typescript@^4.0.0", "@graphql-codegen/typescript@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-4.0.6.tgz#2c9b70dc1eafda912de5e31c119c757b1aa5fca1" - integrity sha512-IBG4N+Blv7KAL27bseruIoLTjORFCT3r+QYyMC3g11uY3/9TPpaUyjSdF70yBe5GIQ6dAgDU+ENUC1v7EPi0rw== +"@graphql-codegen/typescript-react-apollo@^4.3.2": + version "4.3.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript-react-apollo/-/typescript-react-apollo-4.3.2.tgz#0e0fa9cb5b2bc2083ba10f8fbfc8558241151399" + integrity sha512-io2tWfeehBqOB2X6llqLE6B9wjjsXZT/GTZlguGVXdbR7WhSJO9GXyLflXYKxom/h2bPjkVL534Ev6wZLcs0wA== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" - "@graphql-codegen/schema-ast" "^4.0.2" - "@graphql-codegen/visitor-plugin-common" "5.1.0" + "@graphql-codegen/plugin-helpers" "^3.0.0" + "@graphql-codegen/visitor-plugin-common" "2.13.1" auto-bind "~4.0.0" + change-case-all "1.0.15" tslib "~2.6.0" -"@graphql-codegen/visitor-plugin-common@4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.0.0.tgz#b1db0138ea78b96a1f78b78ebce0443faee27fba" - integrity sha512-OFWr5tkrG4nCcE7AI9BSAwuA0VLP16uNCLssbmXpBa1rKR6b4mX+rJTQCoz47TFV5hii8yp8xaWfXVUcsNY39w== +"@graphql-codegen/typescript@^4.1.2": + version "4.1.2" + resolved "https://registry.yarnpkg.com/@graphql-codegen/typescript/-/typescript-4.1.2.tgz#c57d7e8f87b689deec516bd8021a347a98f4e4db" + integrity sha512-GhPgfxgWEkBrvKR2y77OThus3K8B6U3ESo68l7+sHH1XiL2WapK5DdClViblJWKQerJRjfJu8tcaxQ8Wpk6Ogw== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.0" - "@graphql-tools/optimize" "^2.0.0" - "@graphql-tools/relay-operation-optimizer" "^7.0.0" - "@graphql-tools/utils" "^10.0.0" + "@graphql-codegen/plugin-helpers" "^5.1.0" + "@graphql-codegen/schema-ast" "^4.0.2" + "@graphql-codegen/visitor-plugin-common" "5.6.0" auto-bind "~4.0.0" - change-case-all "1.0.15" - dependency-graph "^0.11.0" - graphql-tag "^2.11.0" - parse-filepath "^1.0.2" - tslib "~2.5.0" + tslib "~2.6.0" -"@graphql-codegen/visitor-plugin-common@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.1.0.tgz#4edf7edb53460e71762a5fd8bbf5269bc3d9200b" - integrity sha512-eamQxtA9bjJqI2lU5eYoA1GbdMIRT2X8m8vhWYsVQVWD3qM7sx/IqJU0kx0J3Vd4/CSd36BzL6RKwksibytDIg== +"@graphql-codegen/visitor-plugin-common@2.13.1": + version "2.13.1" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.1.tgz#2228660f6692bcdb96b1f6d91a0661624266b76b" + integrity sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" - "@graphql-tools/optimize" "^2.0.0" - "@graphql-tools/relay-operation-optimizer" "^7.0.0" - "@graphql-tools/utils" "^10.0.0" + "@graphql-codegen/plugin-helpers" "^2.7.2" + "@graphql-tools/optimize" "^1.3.0" + "@graphql-tools/relay-operation-optimizer" "^6.5.0" + "@graphql-tools/utils" "^8.8.0" auto-bind "~4.0.0" - change-case-all "1.0.15" + change-case-all "1.0.14" dependency-graph "^0.11.0" graphql-tag "^2.11.0" parse-filepath "^1.0.2" - tslib "~2.6.0" + tslib "~2.4.0" -"@graphql-codegen/visitor-plugin-common@^4.0.0": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.1.2.tgz#674c5d5813f6c00dd65e1ee148a62536879e65e2" - integrity sha512-yk7iEAL1kYZ2Gi/pvVjdsZhul5WsYEM4Zcgh2Ev15VicMdJmPHsMhNUsZWyVJV0CaQCYpNOFlGD/11Ea3pn4GA== +"@graphql-codegen/visitor-plugin-common@5.6.0", "@graphql-codegen/visitor-plugin-common@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.6.0.tgz#755395422761ad84192b7e6d98688ee9e9a57598" + integrity sha512-PowcVPJbUqMC9xTJ/ZRX1p/fsdMZREc+69CM1YY+AlFng2lL0zsdBskFJSRoviQk2Ch9IPhKGyHxlJCy9X22tg== dependencies: - "@graphql-codegen/plugin-helpers" "^5.0.3" + "@graphql-codegen/plugin-helpers" "^5.1.0" "@graphql-tools/optimize" "^2.0.0" "@graphql-tools/relay-operation-optimizer" "^7.0.0" "@graphql-tools/utils" "^10.0.0" @@ -1639,6 +1675,13 @@ "@graphql-tools/utils" "^10.0.13" tslib "^2.4.0" +"@graphql-tools/optimize@^1.3.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-1.4.0.tgz#20d6a9efa185ef8fc4af4fd409963e0907c6e112" + integrity sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw== + dependencies: + tslib "^2.4.0" + "@graphql-tools/optimize@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@graphql-tools/optimize/-/optimize-2.0.0.tgz#7a9779d180824511248a50c5a241eff6e7a2d906" @@ -1670,6 +1713,15 @@ tslib "^2.4.0" yaml-ast-parser "^0.0.43" +"@graphql-tools/relay-operation-optimizer@^6.5.0": + version "6.5.18" + resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz#a1b74a8e0a5d0c795b8a4d19629b654cf66aa5ab" + integrity sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg== + dependencies: + "@ardatan/relay-compiler" "12.0.0" + "@graphql-tools/utils" "^9.2.1" + tslib "^2.4.0" + "@graphql-tools/relay-operation-optimizer@^7.0.0": version "7.0.1" resolved "https://registry.yarnpkg.com/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-7.0.1.tgz#8ac33e1d2626b6816d9283769c4a05c062b8065a" @@ -1718,6 +1770,21 @@ dset "^3.1.2" tslib "^2.4.0" +"@graphql-tools/utils@^8.8.0": + version "8.13.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-8.13.1.tgz#b247607e400365c2cd87ff54654d4ad25a7ac491" + integrity sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw== + dependencies: + tslib "^2.4.0" + +"@graphql-tools/utils@^9.0.0", "@graphql-tools/utils@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.2.1.tgz#1b3df0ef166cfa3eae706e3518b17d5922721c57" + integrity sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A== + dependencies: + "@graphql-typed-document-node/core" "^3.1.1" + tslib "^2.4.0" + "@graphql-tools/wrap@^10.0.2": version "10.0.2" resolved "https://registry.yarnpkg.com/@graphql-tools/wrap/-/wrap-10.0.2.tgz#87f510b5f35db2771e7743bc3d71059ee4adaf09" @@ -4742,6 +4809,22 @@ chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: ansi-styles "^4.1.0" supports-color "^7.1.0" +change-case-all@1.0.14: + version "1.0.14" + resolved "https://registry.yarnpkg.com/change-case-all/-/change-case-all-1.0.14.tgz#bac04da08ad143278d0ac3dda7eccd39280bfba1" + integrity sha512-CWVm2uT7dmSHdO/z1CXT/n47mWonyypzBbuCy5tN7uMg22BsfkhwT6oHmFCAk+gL1LOOxhdbB9SZz3J1KTY3gA== + dependencies: + change-case "^4.1.2" + is-lower-case "^2.0.2" + is-upper-case "^2.0.2" + lower-case "^2.0.2" + lower-case-first "^2.0.2" + sponge-case "^1.0.1" + swap-case "^2.0.2" + title-case "^3.0.3" + upper-case "^2.0.2" + upper-case-first "^2.0.2" + change-case-all@1.0.15: version "1.0.15" resolved "https://registry.yarnpkg.com/change-case-all/-/change-case-all-1.0.15.tgz#de29393167fc101d646cd76b0ef23e27d09756ad" @@ -4969,13 +5052,6 @@ cookie@^0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -copy-anything@^3.0.2: - version "3.0.5" - resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-3.0.5.tgz#2d92dce8c498f790fa7ad16b01a1ae5a45b020a0" - integrity sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w== - dependencies: - is-what "^4.1.8" - copy-to-clipboard@^3.3.1: version "3.3.3" resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz#55ac43a1db8ae639a4bd99511c148cdd1b83a1b0" @@ -6509,6 +6585,11 @@ graphql-ws@^5.14.0: resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.15.0.tgz#2db79e1b42468a8363bf5ca6168d076e2f8fdebc" integrity sha512-xWGAtm3fig9TIhSaNsg0FaDZ8Pyn/3re3RFlP4rhQcmjRDIPpk1EhRuNB+YSJtLzttyuToaDiNhwT1OMoGnJnw== +graphql-ws@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.16.0.tgz#849efe02f384b4332109329be01d74c345842729" + integrity sha512-Ju2RCU2dQMgSKtArPbEtsK5gNLnsQyTNIo/T7cZNp96niC1x0KdJNZV0TIoilceBPQwfb5itrGl8pkFeOUMl4A== + graphql@^16.6.0: version "16.8.1" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" @@ -6974,11 +7055,6 @@ is-weakset@^2.0.3: call-bind "^1.0.7" get-intrinsic "^1.2.4" -is-what@^4.1.8: - version "4.1.16" - resolved "https://registry.yarnpkg.com/is-what/-/is-what-4.1.16.tgz#1ad860a19da8b4895ad5495da3182ce2acdd7a6f" - integrity sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A== - is-windows@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -8668,10 +8744,10 @@ regjsparser@^0.9.1: dependencies: jsesc "~0.5.0" -rehackt@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.6.tgz#7a0a2247f2295e7548915417e44fbbf03bf004f4" - integrity sha512-l3WEzkt4ntlEc/IB3/mF6SRgNHA6zfQR7BlGOgBTOmx7IJJXojDASav+NsgXHFjHn+6RmwqsGPFgZpabWpeOdw== +rehackt@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.1.0.tgz#a7c5e289c87345f70da8728a7eb878e5d03c696b" + integrity sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw== relay-runtime@12.0.0: version "12.0.0" @@ -8938,11 +9014,6 @@ serialize-javascript@^6.0.1: dependencies: randombytes "^2.1.0" -server-only@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/server-only/-/server-only-0.0.1.tgz#0f366bb6afb618c37c9255a314535dc412cd1c9e" - integrity sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA== - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -9342,13 +9413,6 @@ sucrase@^3.32.0: pirates "^4.0.1" ts-interface-checker "^0.1.9" -"superjson@^1.12.2 || ^2.0.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/superjson/-/superjson-2.2.1.tgz#9377a7fa80fedb10c851c9dbffd942d4bcf79733" - integrity sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA== - dependencies: - copy-anything "^3.0.2" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -9663,10 +9727,10 @@ tslib@^2.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== -tslib@~2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" - integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== +tslib@~2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0"