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

event trigger gives incorrect bigint value in payload #3697

Closed
tirumaraiselvan opened this issue Jan 14, 2020 · 6 comments
Closed

event trigger gives incorrect bigint value in payload #3697

tirumaraiselvan opened this issue Jan 14, 2020 · 6 comments
Assignees
Labels
c/server Related to server k/bug Something isn't working p/high candidate for being included in the upcoming sprint

Comments

@tirumaraiselvan
Copy link
Contributor

From https://stackoverflow.com/questions/59708004/hasura-event-trigger-with-incorrect-bigint-value

The row's id is a big int, e.g. "50755254975729665" but is being passed in the event as a modified version of that id "50755254975729660".

Maybe we need to type-cast such "special" columns while creating the event trigger?

This kind of type-casting was also considered for #2036

@tirumaraiselvan tirumaraiselvan added c/event-triggers k/bug Something isn't working p/high candidate for being included in the upcoming sprint labels Jan 14, 2020
@rikinsk
Copy link
Member

rikinsk commented Jan 14, 2020

Might make sense to just make it respect the existing --stringify-numeric-types flag

@pcmaffey
Copy link

pcmaffey commented Jan 28, 2020

Related: looks like the console also does not respect the --stringify-numeric-types flag. ie when manually inserting a bigint foreign key, will modify the bigint and error with foreign key violations.

@rikinsk
Copy link
Member

rikinsk commented Jan 31, 2020

@pcmaffey This is being tracked in #3667

@iCrawl
Copy link

iCrawl commented Jul 5, 2020

I don't want to unnecessarily bump this issue, but is there any time resolution on this?

I am by far not proficient enough in Haskell to even attempt a PR, but this is a big blocker in 2 applications of mine which would mean I would have to convert all of my columns back to strings as I get incorrect values from the hooks.

And I don't think theres any workarounds I can do myself to resolve this as I read this.

@wzulfikar
Copy link

Hello, any update on this?

I've set HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES=true in my instance. Bigint fields in hasura console are correctly represented in string but in events, they are still numeric (which makes the data inaccurate because of json limitation).

Maybe @marionschleifer has an info on this?

@Naveenaidu Naveenaidu self-assigned this May 11, 2021
@ecthiender
Copy link
Member

Fixed via d8d4626

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/server Related to server k/bug Something isn't working p/high candidate for being included in the upcoming sprint
Projects
None yet
Development

No branches or pull requests

7 participants