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

search by Hex28String input #282

Closed
piyushthapa opened this issue Aug 14, 2020 · 1 comment · Fixed by #280
Closed

search by Hex28String input #282

piyushthapa opened this issue Aug 14, 2020 · 1 comment · Fixed by #280

Comments

@piyushthapa
Copy link

I am trying to search StakePool info with hash

{
  stakePools(where: {hash: {_eq: "e0337098957416ab539aabdcd59568d81ad56bef6f6e83263f9f9f28"}}){
    hash,
    url,
    pledge,
    margin
  }
}

"message": "Expected type Hash32HexString, found \"e0337098957416ab539aabdcd59568d81ad56bef6f6e83263f9f9f28\"; e0337098957416ab539aabdcd59568d81ad56bef6f6e83263f9f9f28 is not a valid hash",

maybe we need to change validateInput function or add new Scalar type?
https://github.com/input-output-hk/cardano-graphql/blob/master/packages/util/src/scalars/Hash32HexString.ts#L21

function validateInput (input: string) {
  if (input.length !== 64) throw new GraphQLError(`${input} is not a valid hash`)
  return `\\x${input}`
}

Any workaround for this?

@rhyslbw
Copy link
Contributor

rhyslbw commented Aug 17, 2020

Hi @piyushthapa. It's fixed in https://github.com/input-output-hk/cardano-graphql/pull/280/files, and should be out this week if a dependent cardano-db-sync release is made.

@rhyslbw rhyslbw added blocked in next release The issue is resolved, but not yet released and removed blocked labels Aug 17, 2020
@rhyslbw rhyslbw removed the in next release The issue is resolved, but not yet released label Sep 8, 2022
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

Successfully merging a pull request may close this issue.

2 participants