-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: map BigInteger to new BigInt scalar (#101)
* fix: map BigInteger to a new Int64 custom scalar * docs: update readme * docs: add RELEASE.md file * fix: rename Int64 to BigInt --------- Authored by: Ido Slonimsky <[email protected]>
- Loading branch information
Showing
4 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Release type: patch | ||
|
||
This change implements a new custom scalar `BigInt` that is mapped to SQLAlchemy's `BigInteger`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from typing import Union | ||
|
||
import strawberry | ||
|
||
BigInt = strawberry.scalar( | ||
Union[int, str], # type: ignore | ||
serialize=lambda v: int(v), | ||
parse_value=lambda v: str(v), | ||
description="BigInt field", | ||
) |