Skip to content

Expose IntegerValue::as_i64 and RelayFieldMultipliers::for_connection - #145

Merged
swalkinshaw merged 1 commit into
mainfrom
wide-integer-helpers
Sep 21, 2026
Merged

swalkinshaw merged 1 commit into
mainfrom
wide-integer-helpers

Conversation

@swalkinshaw

Copy link
Copy Markdown
Contributor

IntegerValue offered as_i32 and as_u64 but kept as_i64 private, so a caller that checks the signed 64-bit range had to go through the decimal text. Make it public.

RelayCostComputer was the only way to get Relay connection multipliers, and it identifies connections through the @cost(kind: "connection") directive. A cost computer that identifies connections another way had to copy the first/last sizing logic. Move that logic onto RelayFieldMultipliers::for_connection, export the type, and have RelayCostComputer use it.

Both of these will be used in bluejay-rb

`IntegerValue` offered `as_i32` and `as_u64` but kept `as_i64` private, so
a caller that checks the signed 64-bit range had to go through the decimal
text. Make it public.

`RelayCostComputer` was the only way to get Relay connection multipliers,
and it identifies connections through the `@cost(kind: "connection")`
directive. A cost computer that identifies connections another way had to
copy the `first`/`last` sizing logic. Move that logic onto
`RelayFieldMultipliers::for_connection`, export the type, and have
`RelayCostComputer` use it.
@swalkinshaw
swalkinshaw merged commit 8fb1bba into main Sep 21, 2026
5 checks passed
@swalkinshaw
swalkinshaw deleted the wide-integer-helpers branch September 21, 2026 17:59
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