Skip to content

How to deal with integer overflow when using variables #120

@gams-temark

Description

@gams-temark

Hi, I have been trying a work-around when dealing with integer values for ranges above int32. I've looked at Scalars for the BigInt type but I am not sure how can I incorporate something like this in this package.

Here's what my variable looks like:

// max range for int32 is 2,147,483,647
myId := 3211136557

v := map[string]any{
    "id":  graphql.Int(myId) // the value for this will be a random int32 since it is overflowing
}

For now, what I'm doing is statically indicating the ID in my query but it would be nice if it could be dynamic.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions