Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有大 int 主键的数据库表。当我的主键太大(如“xxxxxxxxxxxxxx”)时,我在灯塔 graphql 查询中总是得到相同的值:2147483647
有没有办法声明我的 ID 大小?喜欢id:ID! BigInt
id:ID! BigInt
我设法通过添加来完成它:
protected $keyType = 'bigint';
在 laravel 模型类上。
将您的列转换为查询中的字符串,并在 PHP 端使用BC Math或GMP。