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

Remove requirement for GraphQL hex scalars to start with 0x #753

Merged
merged 4 commits into from
Nov 4, 2022

Conversation

Voxelot
Copy link
Member

@Voxelot Voxelot commented Nov 3, 2022

We've been getting a lot of graphql errors in our environments due requests not including a leading 0x prefix on hex string data. This is likely due to a change in fuel-types serde that removed this 0x by default. Even though all the SDK tests work fine with things the way they are, this PR removes the strict requirement on API requests to reduce the likelihood of failed requests that should otherwise pass.

image

@Voxelot Voxelot requested a review from a team November 3, 2022 23:58
@Voxelot Voxelot enabled auto-merge (squash) November 4, 2022 00:16
Copy link
Contributor

@bvrooman bvrooman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding two small tests: one to check that you can create a scalar from a hex input with the 0x prefix and another test to check that you can create a string from a hex input without the prefix.

Copy link
Contributor

@bvrooman bvrooman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Voxelot Voxelot merged commit 3f37b32 into master Nov 4, 2022
@Voxelot Voxelot deleted the Voxelot/less-strict-hex branch November 4, 2022 18:24
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 this pull request may close these issues.

2 participants