Skip to content

Commit

Permalink
Update codegen to new schema (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpmitsch authored Sep 13, 2023
1 parent 45ecf68 commit 9109ce0
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 30 deletions.
3 changes: 2 additions & 1 deletion packages/libs/sdk/src/api/graphql/fragmentMatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"Contract": [
"NFTContract",
"TokenContract"
"TokenContract",
"UnclassifiedContract"
],
"NFT": [
"ERC721NFT",
Expand Down
118 changes: 89 additions & 29 deletions packages/libs/sdk/src/api/graphql/generatedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ export type CodegenCollectionCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -335,6 +337,8 @@ export type CodegenContractCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

export type CodegenContractStandard =
Expand Down Expand Up @@ -362,17 +366,6 @@ export type CodegenContractTokenEventsConnectionEdge = {
node: CodegenTokenEvent;
};

export type CodegenContractsConnection = {
edges: Array<CodegenContractsEdge>;
pageInfo: CodegenPageInfo;
totalCount?: Maybe<Scalars['Int']>;
};

export type CodegenContractsEdge = {
cursor: Scalars['String'];
node: CodegenContract;
};

/** Filter input for contracts */
export type CodegenContractsFilterInput = {
/** The address of the contract */
Expand Down Expand Up @@ -489,6 +482,8 @@ export type CodegenERC721CollectionCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -548,6 +543,8 @@ export type CodegenERC721NFTCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

export type CodegenERC1155Collection = CodegenCollection & {
Expand Down Expand Up @@ -647,6 +644,8 @@ export type CodegenERC1155CollectionCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -704,6 +703,8 @@ export type CodegenERC1155NFTCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -734,7 +735,7 @@ export type CodegenEVMSchemaType = {
collection?: Maybe<CodegenCollection>;
collections: CodegenEVMSchemaTypeCollectionsConnection;
contract?: Maybe<CodegenContract>;
contracts: CodegenContractsConnection;
contracts: CodegenEVMSchemaTypeContractsConnection;
/** Fetch historical gas prices by block number. */
gasPrices?: Maybe<Array<CodegenGasPrice>>;
nft?: Maybe<CodegenNFT>;
Expand Down Expand Up @@ -796,6 +797,8 @@ export type CodegenEVMSchemaTypeCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -845,6 +848,17 @@ export type CodegenEVMSchemaTypeCollectionsConnectionEdge = {
node: CodegenCollection;
};

export type CodegenEVMSchemaTypeContractsConnection = {
edges: Array<CodegenEVMSchemaTypeContractsConnectionEdge>;
pageInfo: CodegenPageInfo;
totalCount?: Maybe<Scalars['Int']>;
};

export type CodegenEVMSchemaTypeContractsConnectionEdge = {
cursor: Scalars['String'];
node: CodegenContract;
};

export type CodegenEVMSchemaTypeTokenEventsConnection = {
edges: Array<CodegenEVMSchemaTypeTokenEventsConnectionEdge>;
pageInfo: CodegenPageInfo;
Expand Down Expand Up @@ -963,6 +977,8 @@ export type CodegenNFTCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

export type CodegenNFTContract = CodegenContract & {
Expand All @@ -989,6 +1005,8 @@ export type CodegenNFTContractCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

export type CodegenNFTTokenEventsConnection = {
Expand Down Expand Up @@ -1042,6 +1060,8 @@ export type CodegenQuery = {
};

export type CodegenStringInput = {
/** Contains */
contains?: InputMaybe<Scalars['String']>;
/** Equal to */
eq?: InputMaybe<Scalars['String']>;
/** In */
Expand Down Expand Up @@ -1107,6 +1127,8 @@ export type CodegenTokenContractCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

/** Token details */
Expand All @@ -1133,6 +1155,9 @@ export type CodegenTokenEvent = {
type: CodegenTokenTransferType;
};

export type CodegenTokenEventOrderBy =
| 'TIMESTAMP';

/** Filter input for token events */
export type CodegenTokenEventsFilterInput = {
/** Filter token events by their block number */
Expand Down Expand Up @@ -1407,6 +1432,33 @@ export type CodegenTrendingPeriod =
| 'THIRTY_MINUTES'
| 'TWELVE_HOURS';

export type CodegenUnclassifiedContract = CodegenContract & {
/** The ABI of the contract */
abi?: Maybe<Scalars['JSON']>;
/** The contract address */
address: Scalars['String'];
/** Contract with verified ABI */
isVerified?: Maybe<Scalars['Boolean']>;
/** The name of the contract */
name?: Maybe<Scalars['String']>;
/** The supported ERC interfaces of the contract */
supportedErcInterfaces?: Maybe<Array<Scalars['String']>>;
/** The symbol of the contract */
symbol?: Maybe<Scalars['String']>;
tokenEvents: CodegenContractTokenEventsConnection;
};


export type CodegenUnclassifiedContractCodegentokenEventsArgs = {
after?: InputMaybe<Scalars['String']>;
before?: InputMaybe<Scalars['String']>;
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};

export type CodegenWallet = {
/** The address of the wallet */
address: Scalars['String'];
Expand All @@ -1419,7 +1471,7 @@ export type CodegenWallet = {
walletCollection?: Maybe<CodegenWalletCollection>;
walletCollections: CodegenWalletWalletCollectionsConnection;
walletNFT?: Maybe<CodegenWalletNFT>;
walletNFTs: CodegenWalletNFTsConnection;
walletNFTs: CodegenWalletWalletNFTsConnection;
};


Expand All @@ -1439,6 +1491,8 @@ export type CodegenWalletCodegentokenEventsArgs = {
filter?: InputMaybe<CodegenTokenEventsFilterInput>;
first?: InputMaybe<Scalars['Int']>;
last?: InputMaybe<Scalars['Int']>;
orderBy?: InputMaybe<CodegenTokenEventOrderBy>;
orderDirection?: InputMaybe<CodegenOrderDirection>;
};


Expand Down Expand Up @@ -1498,6 +1552,8 @@ export type CodegenWalletCollectionOrderBy =

/** Filter of collections in a wallet */
export type CodegenWalletCollectionsFilterInput = {
/** The name of the collection */
collectionName?: InputMaybe<CodegenStringInput>;
contractAddressIn?: InputMaybe<Array<Scalars['String']>>;
};

Expand All @@ -1507,17 +1563,6 @@ export type CodegenWalletNFT = {
nftsCount?: Maybe<Scalars['Int']>;
};

export type CodegenWalletNFTsConnection = {
edges: Array<CodegenWalletNFTsConnectionEdge>;
pageInfo: CodegenPageInfo;
totalCount?: Maybe<Scalars['Int']>;
};

export type CodegenWalletNFTsConnectionEdge = {
cursor: Scalars['String'];
node: CodegenWalletNFT;
};

/** Filter of nfts in a wallet by contract address and optional token id. Results are returned if any of the conditions are matched. */
export type CodegenWalletNFTsContractTokenFilterInput = {
contractAddress: Scalars['String'];
Expand All @@ -1527,6 +1572,8 @@ export type CodegenWalletNFTsContractTokenFilterInput = {
/** Filter of nfts in a wallet */
export type CodegenWalletNFTsFilterInput = {
contractTokens?: InputMaybe<Array<CodegenWalletNFTsContractTokenFilterInput>>;
/** The name of the nft */
nftName?: InputMaybe<CodegenStringInput>;
};

export type CodegenWalletNFTsOrderBy =
Expand Down Expand Up @@ -1571,12 +1618,12 @@ export type CodegenWalletTokenEventsConnectionEdge = {
};

export type CodegenWalletTransactionsConnection = {
edges: Array<CodegenWalletTransactionsEdge>;
edges: Array<CodegenWalletTransactionsConnectionEdge>;
pageInfo: CodegenPageInfo;
totalCount?: Maybe<Scalars['Int']>;
};

export type CodegenWalletTransactionsEdge = {
export type CodegenWalletTransactionsConnectionEdge = {
cursor: Scalars['String'];
node: CodegenTransaction;
};
Expand All @@ -1592,6 +1639,17 @@ export type CodegenWalletWalletCollectionsConnectionEdge = {
node: CodegenWalletCollection;
};

export type CodegenWalletWalletNFTsConnection = {
edges: Array<CodegenWalletWalletNFTsConnectionEdge>;
pageInfo: CodegenPageInfo;
totalCount?: Maybe<Scalars['Int']>;
};

export type CodegenWalletWalletNFTsConnectionEdge = {
cursor: Scalars['String'];
node: CodegenWalletNFT;
};

export type CodegenEthMainnetContractDetailsQueryVariables = Exact<{
contractAddress: Scalars['String'];
}>;
Expand Down Expand Up @@ -1781,7 +1839,7 @@ export type CodegenEthMainnetGasPricesQuery = { ethereum: CodegenGasPriceFragmen

export type CodegenCollectionEventsFragmentFragment = { collection?: { address: string, tokenEvents: { pageInfo: CodegenPaginationFragment, edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }> } } | { address: string, tokenEvents: { pageInfo: CodegenPaginationFragment, edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }> } } | null };

export type CodegenEventsByContractFragment = { contract?: { tokenEvents: { edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }>, pageInfo: CodegenPaginationFragment } } | { tokenEvents: { edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }>, pageInfo: CodegenPaginationFragment } } | null };
export type CodegenEventsByContractFragment = { contract?: { tokenEvents: { edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }>, pageInfo: CodegenPaginationFragment } } | { tokenEvents: { edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }>, pageInfo: CodegenPaginationFragment } } | { tokenEvents: { edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }>, pageInfo: CodegenPaginationFragment } } | null };

export type CodegenNftEventsFragmentFragment = { nft?: { contractAddress: string, tokenId: any, tokenEvents: { pageInfo: CodegenPaginationFragment, edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }> } } | { contractAddress: string, tokenId: any, tokenEvents: { pageInfo: CodegenPaginationFragment, edges: Array<{ node: CodegenTokenEventInfo_CodegenTokenBurnEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenMintEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSaleEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenSwapEvent_CodegenFragment | CodegenTokenEventInfo_CodegenTokenTransferEvent_CodegenFragment }> } } | null };

Expand All @@ -1797,7 +1855,7 @@ export type CodegenVerifyOwnershipInfoByENSFragment = { walletByENS?: { walletNF

export type CodegenVerifyOwnershipNFTDetailsFragment = { nft?: { contractAddress: string, tokenId: any } | { contractAddress: string, tokenId: any } | null };

export type CodegenContractDetailsFragment = { contract?: CodegenContractInfo_CodegenNFTContract_CodegenFragment | CodegenContractInfo_CodegenTokenContract_CodegenFragment | null };
export type CodegenContractDetailsFragment = { contract?: CodegenContractInfo_CodegenNFTContract_CodegenFragment | CodegenContractInfo_CodegenTokenContract_CodegenFragment | CodegenContractInfo_CodegenUnclassifiedContract_CodegenFragment | null };

export type CodegenGetBalancesByWalletAddressFragmentFragment = { walletByAddress?: { address: string, ensName?: string | null, tokenBalances: { edges: Array<{ node: CodegenTokenBalanceNodeFragment }>, pageInfo: CodegenPaginationFragment } } | null };

Expand Down Expand Up @@ -1835,7 +1893,9 @@ export type CodegenContractInfo_CodegenNFTContract_CodegenFragment = { __typenam

export type CodegenContractInfo_CodegenTokenContract_CodegenFragment = { __typename: 'TokenContract', decimals?: any | null, abi?: any | null, address: string, isVerified?: boolean | null, name?: string | null, supportedErcInterfaces?: Array<string> | null, symbol?: string | null };

export type CodegenContractInfoFragment = CodegenContractInfo_CodegenNFTContract_CodegenFragment | CodegenContractInfo_CodegenTokenContract_CodegenFragment;
export type CodegenContractInfo_CodegenUnclassifiedContract_CodegenFragment = { __typename: 'UnclassifiedContract', abi?: any | null, address: string, isVerified?: boolean | null, name?: string | null, supportedErcInterfaces?: Array<string> | null, symbol?: string | null };

export type CodegenContractInfoFragment = CodegenContractInfo_CodegenNFTContract_CodegenFragment | CodegenContractInfo_CodegenTokenContract_CodegenFragment | CodegenContractInfo_CodegenUnclassifiedContract_CodegenFragment;

export type CodegenGasPriceInfoFragment = { blockNumber: number, total: number, average: number, ceiling: number, floor: number, median: number };

Expand Down

0 comments on commit 9109ce0

Please sign in to comment.