-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds nfts.getContractEvents and nfts.getCollectionEvents #46
Conversation
}, | ||
}, | ||
// TODO: Figure out type policies | ||
typePolicies: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't the previous working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was seeing this:
Invariant Violation: Missing field 'contractAddress' while extracting keyFields from {"tokenEvents":{"pageInfo":{"endCursor":"T2Zmc2V0Q29ubmVjdGlvbjox","hasNextPage":false,"hasPreviousPage":false,"startCursor":"T2Zmc2V0Q29ubmVjdGlvbjow","__typename":"PageInfo"},"edges":[{"node":{"blockNumber":13181737,"fromAddress":"0x0000000000000000000000000000000000000000","timestamp":"2021-09-08T00:03:32.000Z","toAddress":"0x5467ba7a07a11769c2bd499f9fbe94a6b0eff269","transactionHash":"0xf78f4c8ee2029cf961a3cad6c6cafab3fbe14eb1932d705d655cba8b6b071265","transferIndex":398,"type":"MINT","tokenQuantity":1,"__typename":"TokenMintEvent"},"__typename":"NFTTokenEventsConnectionEdge"},{"node":{"blockNumber":14604458,"fromAddress":"0x5467ba7a07a11769c2bd499f9fbe94a6b0eff269","timestamp":"2022-04-17T18:50:08.000Z","toAddress":"0xa673b62171ed57d184214aae4bc0746024ab8cd8","transactionHash":"0xa69713bc3b43b90f4687ca8fe853021b828017feed6104dd4394413800fe85cc","transferIndex":576,"type":"SALE","marketplace":"OPENSEA","receivedTokenContractAddress":"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","receivedTokenId":null,"sentTokenId":2000,"__typename":"TokenSaleEvent"},"__typename":"NFTTokenEventsConnectionEdge"}],"__typename":"NFTTokenEventsConnection"},"__typename":"ERC721NFT"}
My thought is to push the type policies in general out until later, especially as we add more queries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well structured, just small validation
I left out the filters but going to follow up with adding them in general, it was a little tricky with the enums that apollo-codegen emits since they won't work with strings: see issue here