Skip to content
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

Allow TokenID to not be an integer when querying through graphql #88

Open
webel opened this issue Feb 16, 2023 · 2 comments
Open

Allow TokenID to not be an integer when querying through graphql #88

webel opened this issue Feb 16, 2023 · 2 comments

Comments

@webel
Copy link

webel commented Feb 16, 2023

Hi,

If I'm reading the sdk right this is just an issue when directly querying the graph, here's a reproducible query with an otherwise valid tokenID;

query TokenEvents {
  token(token: {address: "0xc729Ce9bF1030fbb639849a96fA8BBD013680B64", tokenId: "0xceef2e284c65b5111ce7533bb10e97a1f3f8b7caa0033c994b55a00e302d1643"}) {
    events(sort: {sortKey: CREATED, sortDirection: ASC}) {
      eventType
      transactionInfo {
        blockTimestamp
        transactionHash
      }
    }
  }
}

Throws error:

1 validation error for TokenInputModel
token_id
Token id: 0xceef2e284c65b5111ce7533bb10e97a1f3f8b7caa0033c994b55a00e302d1643 is not a valid integer. (type=value_error)
@webel
Copy link
Author

webel commented Feb 16, 2023

Hmm just searched your organisation for TokenInputModel without results, so guessing the schemas are in a private repo. Thought I'd try and help out otherwise :)

@iainnash
Copy link
Collaborator

Hi! This should work if you convert the tokenId to base 10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants