Skip to content

Commit 28fec2f

Browse files
committed
Fix #295
1 parent 2dd4cc1 commit 28fec2f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/JSONResponse.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,21 @@ struct ResponseHandler : rapidjson::BaseReaderHandler<rapidjson::UTF8<>, Respons
132132
if (i > static_cast<unsigned int>(std::numeric_limits<int>::max()))
133133
{
134134
// https://spec.graphql.org/October2021/#sec-Int
135-
throw std::overflow_error("GraphQL only supports 32-bit signed integers");
135+
return Double(static_cast<double>(i));
136136
}
137137
return Int(static_cast<int>(i));
138138
}
139139

140-
bool Int64(int64_t /*i*/)
140+
bool Int64(int64_t i)
141141
{
142142
// https://spec.graphql.org/October2021/#sec-Int
143-
throw std::overflow_error("GraphQL only supports 32-bit signed integers");
143+
return Double(static_cast<double>(i));
144144
}
145145

146-
bool Uint64(uint64_t /*i*/)
146+
bool Uint64(uint64_t i)
147147
{
148148
// https://spec.graphql.org/October2021/#sec-Int
149-
throw std::overflow_error("GraphQL only supports 32-bit signed integers");
149+
return Double(static_cast<double>(i));
150150
}
151151

152152
bool Double(double d)

0 commit comments

Comments
 (0)