You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func isBoolNumber(num:NSNumber)->Bool{letboolID=CFBooleanGetTypeID()// the type ID of CFBooleanletnumID=CFGetTypeID(num)// the type ID of numreturn numID == boolID
}
CFBooleanGetTypeID is already used in several places in GraphQL
We have in application argument with default value 0
"offset": GraphQLArgument(type: GraphQLInt, defaultValue: 0),
If this argument is not passed, then instead of integer
0
booleanfalse
is used. Soarguments["offset"].int
returnsnil
In the screenshot you can see that Any 0 is casted to Bool and is interpreted as false
It happens as
try JSONSerialization.jsonObject(with: data, options: .allowFragments)
returns NSNumber, and 0 is interpreted as false (https://developer.apple.com/documentation/foundation/nsnumber/1410865-boolvalue)GraphQL 1.1.7
Xcode Version 12.0 (12A7209)
The text was updated successfully, but these errors were encountered: